Thread: ı have a problem install SAC in ubuntu. please help

Started: 2019-05-07 09:14:07
Last activity: 2019-05-10 10:58:38
Topics: SAC Help
Hi,
I did as follows but ı couldn't install sac in Ubuntu. please help me.
Firstly, I put sac files into /home/deprem/soft/sac

Secondly, I modified my sacinit.sh into this following lines ( because the README instructions say: the sacinit file is modified according to that)

export SACHOME=/home/deprem/soft/sac
export PATH=${PATH}:${SACHOME}/bin
export SACAUX=${SACHOME}/aux

Then, I modified my .bashrc file and added the following lines

export SACHOME=/home/deprem/soft/sac
source ${SACHOME}/bin/sacinit.sh

and after saving the file. I run following command
deprem@deprem-HP-Z1-Workstation:~$ source .bashrc

the following error message come.

bash: export: `1': not a valid identifier
bash: export: `1': not a valid identifier
bash: export: `0': not a valid identifier

What can I do for this?. Sac is still not working and I have this problem. Please help me for this installation problem. any suggestions?

  • Milton Plasencia
    2019-05-08 00:19:53
    Hi,

    Check for a typo, and strictly

    export NAME=value without space around =
    or
    export $PATH, must be export PATH

    check the variable value with echo,
    echo $PATH
    echo $SACHOME
    etc

    or post your .bash_profile or .bashrc and your sacinit.sh

    HTH,

    Milton

    ----------------------------
    Milton Plasencia
    mplasencia<at>inogs.it



    On Tue, May 7, 2019 at 6:25 PM Sukran Perk <sukraster<at>gmail.com> wrote:

    Hi,
    I did as follows but ı couldn't install sac in Ubuntu. please help me.
    Firstly, I put sac files into /home/deprem/soft/sac

    Secondly, I modified my sacinit.sh into this following lines ( because the
    README instructions say: the sacinit file is modified according to that)

    export SACHOME=/home/deprem/soft/sac
    export PATH=${PATH}:${SACHOME}/bin
    export SACAUX=${SACHOME}/aux

    Then, I modified my .bashrc file and added the following lines

    export SACHOME=/home/deprem/soft/sac
    source ${SACHOME}/bin/sacinit.sh

    and after saving the file. I run following command
    deprem@deprem-HP-Z1-Workstation:~$ source .bashrc

    the following error message come.

    bash: export: `1': not a valid identifier
    bash: export: `1': not a valid identifier
    bash: export: `0': not a valid identifier

    What can I do for this?. Sac is still not working and I have this problem.
    Please help me for this installation problem. any suggestions?

    ----------------------
    SAC Help
    Topic home: http://ds.iris.edu/message-center/topic/sac-help/ |
    Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

    Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
    Update subscription preferences at http://ds.iris.edu/account/profile/


    • Hi Milton, this is my sacinith.sh file

      # This script can be used to test the effects of different environmental
      # options within SAC. Copy it to the directory from which you want to
      # launch SAC and edit it to set the various options. If the name of your
      # copy is mysacinit.csh, the settings will be set for the current session
      # by entering
      #
      # . ./mysacinit.sh
      #
      # and then run SAC. Once one is satisfied, one should put the
      # settings directly in your start-up script.
      #
      # Initialize the SAC Environment (only SACHOME may need to be changed)
      export SACHOME=/home/deprem/soft/sac
      export PATH=${PATH}:${SACHOME}/bin
      export SACAUX=${SACHOME}/aux

      # Uncomment the desired options below to change from the default and
      # comment out the default option
      #
      # SAC_DISPLAY_COPYRIGHT
      # Undefined or 1 -- Show Copyright Notice on Initialization ( Default )
      # 0 -- Do not show Copyright Notice
      # The copyright is only displayed during the initialization of SAC
      # It contains the build date, version number and copyright information
      # Default: SAC_DISPLAY_COPYRIGHT 1
      export SAC_DISPLAY_COPYRIGHT 1
      # export SAC_DISPLAY_COPYRIGHT=0

      # SAC_USE_DATABASE
      # Undefined or 1 -- Use SeisMgr Database ( Default )
      # 0 -- Do Not Use SeisMgr Database
      # The SeisMgr database attempts to keep the CSS data fields in line
      # with those in the SAC header. If you are handling CSS data it
      # would be wise to keep the database on. Using the SeisMgr database
      # currently can be very slow due when handling hundreds of files
      # and turning it off should show a dramatic speed increase.
      # HOWEVER, some features of SAC still depend on its existence, which is
      # why the default is to have it on.
      # Default: SAC_USE_DATABASE 1
      export SAC_USE_DATABASE 1
      # export SAC_USE_DATABASE=0

      # SAC_PPK_LARGE_CROSSHAIRS
      # Undefined or 0 - Tiny Cross Hairs ( Default )
      # 1 - Cross Hairs of the Full Plot Window
      # In older version of SAC, ppk displayed crosshairs on the window
      # which extended the entire window length. To some, this was desirable.
      # To utilize this behavior again, set SAC_PPK_LARGE_CROSSHAIRS to 1
      # Default: SAC_PPK_LARGE_CROSSHAIRS 0
      export SAC_PPK_LARGE_CROSSHAIRS 0
      # export SAC_PPK_LARGE_CROSSHAIRS=1



      This is my bashrc file;
      # ~/.bashrc: executed by bash(1) for non-login shells.
      # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
      # for examples

      # If not running interactively, don't do anything
      case $- in
      *i*) ;;
      *) return;;
      esac

      # don't put duplicate lines or lines starting with space in the history.
      # See bash(1) for more options
      HISTCONTROL=ignoreboth

      # append to the history file, don't overwrite it
      shopt -s histappend

      # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
      HISTSIZE=1000
      HISTFILESIZE=2000

      # check the window size after each command and, if necessary,
      # update the values of LINES and COLUMNS.
      shopt -s checkwinsize

      # If set, the pattern "**" used in a pathname expansion context will
      # match all files and zero or more directories and subdirectories.
      #shopt -s globstar

      # make less more friendly for non-text input files, see lesspipe(1)
      [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

      # set variable identifying the chroot you work in (used in the prompt below)
      if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
      debian_chroot=$(cat /etc/debian_chroot)
      fi

      # set a fancy prompt (non-color, unless we know we "want" color)
      case "$TERM" in
      xterm-color|*-256color) color_prompt=yes;;
      esac

      # uncomment for a colored prompt, if the terminal has the capability; turned
      # off by default to not distract the user: the focus in a terminal window
      # should be on the output of commands, not on the prompt
      #force_color_prompt=yes

      if [ -n "$force_color_prompt" ]; then
      if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
      # We have color support; assume it's compliant with Ecma-48
      # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
      # a case would tend to support setf rather than setaf.)
      color_prompt=yes
      else
      color_prompt=
      fi
      fi

      if [ "$color_prompt" = yes ]; then
      PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
      else
      PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
      fi
      unset color_prompt force_color_prompt

      # If this is an xterm set the title to user@host:dir
      case "$TERM" in
      xterm*|rxvt*)
      PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
      ;;
      *)
      ;;
      esac

      # enable color support of ls and also add handy aliases
      if [ -x /usr/bin/dircolors ]; then
      test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
      alias ls='ls --color=auto'
      #alias dir='dir --color=auto'
      #alias vdir='vdir --color=auto'

      alias grep='grep --color=auto'
      alias fgrep='fgrep --color=auto'
      alias egrep='egrep --color=auto'
      fi

      # colored GCC warnings and errors
      #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

      # some more ls aliases
      alias ll='ls -alF'
      alias la='ls -A'
      alias l='ls -CF'

      # Add an "alert" alias for long running commands. Use like so:
      # sleep 10; alert
      alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
      alias select="/home/seismo/PRO/select"
      # Alias definitions.
      # You may want to put all your additions into a separate file like
      # ~/.bash_aliases, instead of adding them here directly.
      # See /usr/share/doc/bash-doc/examples in the bash-doc package.

      if [ -f ~/.bash_aliases ]; then
      . ~/.bash_aliases
      fi

      # enable programmable completion features (you don't need to enable
      # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
      # sources /etc/bash.bashrc).
      if ! shopt -oq posix; then
      if [ -f /usr/share/bash-completion/bash_completion ]; then
      . /usr/share/bash-completion/bash_completion
      elif [ -f /etc/bash_completion ]; then
      . /etc/bash_completion
      fi
      fi

      . /home/deprem/seismo/COM/SEISAN.bash

      export SACHOME=/home/deprem/soft/sac
      source ${SACHOME}/bin/sacinit.sh


      I could not install sac :((( Can you help me please? where is the wrong?








      • Milton Plasencia
        2019-05-08 12:56:54
        Sukran,

        In your sacinit.sh,

        The line: export SAC_DISPLAY_COPYRIGHT 1, must be export SAC_DISPLAY_COPYRIGHT=1 or put # (to comment it)

        The line export SAC_USE_DATABASE 1, must be export SAC_USE_DATABASE=1 if you use database or comment it.

        The line export SAC_PPK_LARGE_CROSSHAIRS 0, must be export SAC_PPK_LARGE_CROSSHAIRS=0 or comment it.

        And try again sourcing ~/.bashrc

        HTH,

        Milton


        On 8 May 2019, at 11:09, Sukran Perk <sukraster<at>gmail.com> wrote:

        Hi Milton, this is my sacinith.sh file

        # This script can be used to test the effects of different environmental
        # options within SAC. Copy it to the directory from which you want to
        # launch SAC and edit it to set the various options. If the name of your
        # copy is mysacinit.csh, the settings will be set for the current session
        # by entering
        #
        # . ./mysacinit.sh
        #
        # and then run SAC. Once one is satisfied, one should put the
        # settings directly in your start-up script.
        #
        # Initialize the SAC Environment (only SACHOME may need to be changed)
        export SACHOME=/home/deprem/soft/sac
        export PATH=${PATH}:${SACHOME}/bin
        export SACAUX=${SACHOME}/aux

        # Uncomment the desired options below to change from the default and
        # comment out the default option
        #
        # SAC_DISPLAY_COPYRIGHT
        # Undefined or 1 -- Show Copyright Notice on Initialization ( Default )
        # 0 -- Do not show Copyright Notice
        # The copyright is only displayed during the initialization of SAC
        # It contains the build date, version number and copyright information
        # Default: SAC_DISPLAY_COPYRIGHT 1
        export SAC_DISPLAY_COPYRIGHT 1
        # export SAC_DISPLAY_COPYRIGHT=0

        # SAC_USE_DATABASE
        # Undefined or 1 -- Use SeisMgr Database ( Default )
        # 0 -- Do Not Use SeisMgr Database
        # The SeisMgr database attempts to keep the CSS data fields in line
        # with those in the SAC header. If you are handling CSS data it
        # would be wise to keep the database on. Using the SeisMgr database
        # currently can be very slow due when handling hundreds of files
        # and turning it off should show a dramatic speed increase.
        # HOWEVER, some features of SAC still depend on its existence, which is
        # why the default is to have it on.
        # Default: SAC_USE_DATABASE 1
        export SAC_USE_DATABASE 1
        # export SAC_USE_DATABASE=0

        # SAC_PPK_LARGE_CROSSHAIRS
        # Undefined or 0 - Tiny Cross Hairs ( Default )
        # 1 - Cross Hairs of the Full Plot Window
        # In older version of SAC, ppk displayed crosshairs on the window
        # which extended the entire window length. To some, this was desirable.
        # To utilize this behavior again, set SAC_PPK_LARGE_CROSSHAIRS to 1
        # Default: SAC_PPK_LARGE_CROSSHAIRS 0
        export SAC_PPK_LARGE_CROSSHAIRS 0
        # export SAC_PPK_LARGE_CROSSHAIRS=1



        This is my bashrc file;
        # ~/.bashrc: executed by bash(1) for non-login shells.
        # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
        # for examples

        # If not running interactively, don't do anything
        case $- in
        *i*) ;;
        *) return;;
        esac

        # don't put duplicate lines or lines starting with space in the history.
        # See bash(1) for more options
        HISTCONTROL=ignoreboth

        # append to the history file, don't overwrite it
        shopt -s histappend

        # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
        HISTSIZE=1000
        HISTFILESIZE=2000

        # check the window size after each command and, if necessary,
        # update the values of LINES and COLUMNS.
        shopt -s checkwinsize

        # If set, the pattern "**" used in a pathname expansion context will
        # match all files and zero or more directories and subdirectories.
        #shopt -s globstar

        # make less more friendly for non-text input files, see lesspipe(1)
        [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"

        # set variable identifying the chroot you work in (used in the prompt below)
        if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
        debian_chroot=$(cat /etc/debian_chroot)
        fi

        # set a fancy prompt (non-color, unless we know we "want" color)
        case "$TERM" in
        xterm-color|*-256color) color_prompt=yes;;
        esac

        # uncomment for a colored prompt, if the terminal has the capability; turned
        # off by default to not distract the user: the focus in a terminal window
        # should be on the output of commands, not on the prompt
        #force_color_prompt=yes

        if [ -n "$force_color_prompt" ]; then
        if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
        # We have color support; assume it's compliant with Ecma-48
        # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
        # a case would tend to support setf rather than setaf.)
        color_prompt=yes
        else
        color_prompt=
        fi
        fi

        if [ "$color_prompt" = yes ]; then
        PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
        else
        PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
        fi
        unset color_prompt force_color_prompt

        # If this is an xterm set the title to user@host:dir
        case "$TERM" in
        xterm*|rxvt*)
        PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
        ;;
        *)
        ;;
        esac

        # enable color support of ls and also add handy aliases
        if [ -x /usr/bin/dircolors ]; then
        test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
        alias ls='ls --color=auto'
        #alias dir='dir --color=auto'
        #alias vdir='vdir --color=auto'

        alias grep='grep --color=auto'
        alias fgrep='fgrep --color=auto'
        alias egrep='egrep --color=auto'
        fi

        # colored GCC warnings and errors
        #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'

        # some more ls aliases
        alias ll='ls -alF'
        alias la='ls -A'
        alias l='ls -CF'

        # Add an "alert" alias for long running commands. Use like so:
        # sleep 10; alert
        alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
        alias select="/home/seismo/PRO/select"
        # Alias definitions.
        # You may want to put all your additions into a separate file like
        # ~/.bash_aliases, instead of adding them here directly.
        # See /usr/share/doc/bash-doc/examples in the bash-doc package.

        if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
        fi

        # enable programmable completion features (you don't need to enable
        # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
        # sources /etc/bash.bashrc).
        if ! shopt -oq posix; then
        if [ -f /usr/share/bash-completion/bash_completion ]; then
        . /usr/share/bash-completion/bash_completion
        elif [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
        fi
        fi

        . /home/deprem/seismo/COM/SEISAN.bash

        export SACHOME=/home/deprem/soft/sac
        source ${SACHOME}/bin/sacinit.sh


        I could not install sac :((( Can you help me please? where is the wrong?








        ----------------------
        SAC Help
        Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

        Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
        Update subscription preferences at http://ds.iris.edu/account/profile/


        • Hi milton,

          When ı did all the things you said there is the following error

          sac: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

          what should ı do for this?

          is there a missing file in sac folder? should ı download new sac from ınternet?
          • Milton Plasencia
            2019-05-10 10:58:38
            Hi,

            You must to install the package that contain libncurses.so.5 in your system,
            It is not depend of SAC.

            The libraries used in sac are in ~$SACHOME/lib and not include libncur..

            HTH,

            Milton

            On 10 May 2019, at 10:51, Sukran Perk <sukraster<at>gmail.com> wrote:

            Hi milton,

            When ı did all the things you said there is the following error

            sac: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

            what should ı do for this?

            is there a missing file in sac folder? should ı download new sac from ınternet?

            ----------------------
            SAC Help
            Topic home: http://ds.iris.edu/message-center/topic/sac-help/ | Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

            Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
            Update subscription preferences at http://ds.iris.edu/account/profile/


  • Hello Sukran,
    I think you are missing double quotes. Please see this previous thread on
    the same matter.
    https://ds.iris.edu/message-center/thread/5119/

    Januka

    Januka Attanayake
    Research Fellow | Earthquake Seismology
    Homepage: *https://sites.google.com/site/janukaattanayake
    https://sites.google.com/site/janukaattanayake*

    School of Earth Sciences | McCoy Bldg. 200
    University of Melbourne | Parkville 3010 VIC
    Australia




    On Wed, 8 May 2019 at 02:25, Sukran Perk <sukraster<at>gmail.com> wrote:

    Hi,
    I did as follows but ı couldn't install sac in Ubuntu. please help me.
    Firstly, I put sac files into /home/deprem/soft/sac

    Secondly, I modified my sacinit.sh into this following lines ( because the
    README instructions say: the sacinit file is modified according to that)

    export SACHOME=/home/deprem/soft/sac
    export PATH=${PATH}:${SACHOME}/bin
    export SACAUX=${SACHOME}/aux

    Then, I modified my .bashrc file and added the following lines

    export SACHOME=/home/deprem/soft/sac
    source ${SACHOME}/bin/sacinit.sh

    and after saving the file. I run following command
    deprem@deprem-HP-Z1-Workstation:~$ source .bashrc

    the following error message come.

    bash: export: `1': not a valid identifier
    bash: export: `1': not a valid identifier
    bash: export: `0': not a valid identifier

    What can I do for this?. Sac is still not working and I have this problem.
    Please help me for this installation problem. any suggestions?

    ----------------------
    SAC Help
    Topic home: http://ds.iris.edu/message-center/topic/sac-help/ |
    Unsubscribe: sac-help-unsubscribe<at>lists.ds.iris.edu

    Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
    Update subscription preferences at http://ds.iris.edu/account/profile/


Page built 09:18:35 | v.b'ea7a92