I am installing software, and the last line (here is the picture of my terminal 1) delivers the message: -bash: syntax error near unexpected token `(' . I was thinking that I need to insert a backward slash somewhere in between the parentheses in the command line that gave me the error message when I ran it. However, I am skeptical of having to change anything because this line is from NASA from a tutorial to install certain software (seems pretty official). Thank you!
It looks like you're following the instructions at this website:
https://heasarc.gsfc.nasa.gov/lheasoft/install.html
And you've copied this command into your terminal
gunzip -c heasoft6.26(src|arch).tar.gz | tar xf -
The command isn't meant to be copied literally, the writers intend you replace the "(src|arch)" part to match the file you've downloaded.
Check what files exist in your directory by running ls -l
When you see the file you're looking for, run the command again with the correct filename.
For example if you downloaded the pre-compiled binary for OS X, run:
gunzip -c heasoft-6.26.1mac_intel_darwin18_patch.tar.gz | tar xf -
Related
When I open terminal, I get following error at the top.
bash: export: `/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/root/bin': not a valid identifier
I am new to linux and I was trying to execute ls command but it was not working and giving some error so I followed this answer to fix it. Now I am able to list down the file using ls command but getting this error. I wonder it will have some serious affect somewhere else or not.
Turns out my path in ~/.bashrc was not correct. So this is what I did.
gedit ~/.bashrc
After the in the opened file I update the PATH to this at the end of the file.
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
Being grateful for some people on the Internet who helped me at stackexchange(and stackoverflow,sourceforge.....), I finally got to the step "make" when I want to build the cmu sphinxbase from source.
Here are the most recent commands I execute under sphinxbase directory (Windows cygwin):
- $./autogen.sh
- $./configure
- $make
I got this message:
/usr/bin/bash: -c: line 20: syntax error near unexpected token `('
/usr/bin/bash: -c: line 20: ` (CDPATH="${ZSH_VERSION+.}:" && cd
$subdir && C:/Program Files (x86)/GnuWin32/bin/make $local_target) \'
make: *** [check-recursive] Error 1
After some information searching, I guess that this is due to the $PATH variable issue.
I am not pretty sure if the error raises because of the behavior of cygwin or maybe of the GNU-make(for win32).
If the system searches for some string containing usr/bin/, it might get the wrong route.
Maybe there is something else I haven't noticed, so I welcome any helps or ideas.
Edited:
Please see my Makefile link here.
As Iguananaut and Matzeri say in the comment,
cygwin make is not cygwin build
and
cygwin make is not GNUwin32 make
I open my cygwin and execute
apt-cyg install make
And redo the make command under the sphinxbase directory.
It works fine.
(However, we need to install apt-cyg in advance.)
Never use Cygwin for Linux things, it is always broken. Simply install Linux in a virtual machine.
Only a guess: Quote this to:
"C:/Program Files (x86)/GnuWin32/bin/make"
^^
(... or the related symbol)
I tried to do a little searching myself on this issue, but was unable to find anything helpful. As far as I can tell, whenever I run a command in the terminal that errors, the next command I run will be skipped. A few examples with output:
$ rb
-bash: rb: command not found
$ ls <-------- this command gets skipped
$ cd nonexistent-dir
-bash: cd: nonexistent-dir: No such file or directory
$ cd existing-dir <------ this gets skipped
After the skip, everything resumes as normal until another error. I apologize for the likely awful formatting, this is my first time posting. I feel like I am missing something fairly obvious, but I would appreciate any help or guidance anyone has!
As an additional update, does anyone understand this behavior?
$ kj
-bash: kj: command not found
$ k;l
-bash: l: command not found
What I can note is that the terminal is skipping the input 'k;' between the errors. Unfortunately, I do not know how to further diagnose and solve the issue.
I am trying to live with Windows (at least have to on working environment)... And I do not like cygwin actually. I am using git-bash as minimal env.
I would like to use vim as my favourite editor. After setting SVN_EDITOR to vim
export SVN_EDITOR=/bin/vim
And I have stopped on the error
'C:/Program' is not recognized as an internal or external command, operable program or batch file.
svn: E200012: system('C:/Program Files (x86)/Git/bin/vim svn-prop.tmp') returned 1
Setting vim to some more stylish dir, playing slashes and quotes didn't help. Also finally I have looked throw those issues on stackoverflow, but with no success
svn errors out strangely
Getting error trying to commit using Subversion on Mac OS X
Finally I've resolved issue by following. Hope that helps to anybody.
export SVN_EDITOR=bash /bin/vim --noplugins
You have to escape the spaces and the parentheses in your path:
export SVN_EDITOR='C:/Program\ Files\ \(x86\)/Vim/vim74/gvim.exe'
Otherwise , you'll get No such file or directory for not having escaped spaces and sh: -c: line 0: syntax error near unexpected token `(' if you forgot to escape the parentheses in your path.
I've used virtualenv to program using my mac terminal for about 1/2 a year w/no issues. Suddenly today I began to get relative path errors when I tried to load python. There was no apparent reason for it, and eventually I tried restarting my computer.
Then I opened a new terminal window, and these new errors were present for the first time:
-bash: eval: line 4: unexpected EOF while looking for matching `"'
-bash: eval: line 5: syntax error: unexpected end of file
I assume the two misbehaviors are related in some way. Any idea what would be causing it? What files could the terminal be looking at that would cause this? AFIAK, I haven't changed anything on which it would depend.
Thx for any advice!
My guess is that a bash startup file (~/.bashrc, or possibly /etc/profile, ~/.bash_profile, ~/.bash_login or ~/.profile) contains a syntax error, and that causes all sorts of errors for other programs because the setup of the environment they expect does not take place.
From the error message it seems like an unterminated string constant, i.e. a missing ".
The bash manual on startup files has information about this.
You can also try to start bash in debug mode (bash -x (interactive shell) or bash -lx ( login shell)) to try to identify the error.