My shell give me this error when trying to do a sudo
/etc/sudoers: syntax error near line 30 <<
I did not modify this file...
anyway the 30th line is the very end of the file.
I paste here the last 3 rows, from 27 to 30
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
please help me to understand the problem and fix it.
I am a newbie on linux.
If the 30th line is the last one it might indicate that you have problems in the file somewhere along the way.
The parser has reached the end of the file and is telling you there is an error (might be looking for unclosed brackets of any kind etc).
If you can parse the full file or try to read it and go line by line to figure out where is the error.
Related
now I get a bizarre error as if I have changed/lost a closing argument such as fi, statement closure such as , or a hidden series of tabs.
This is the message I get in my err file:
./cron_run.sh: line 156: syntax error near unexpected token `else'
./cron_run.sh: line 156: ` else'
Again, I did not touch these lines. Not even close and what I added was another operation to dump a mongo collection to the backup directory. So I had:
...start of script
mongodump... # this was existing
mongodump... # this was the addition
...rest of script (about 70) lines unchanged
Key point:
the above lines worked
the code/server executed as expected
the error/crash occurred at the end of the process after execution (so the whole thing actually worked!)
I looked at the code with syntax highlighting (vim, nano) and I cannot see anything wrong with it (at least not an obvious thing such as a bracket, fi or missing back tick)!
Any suggestions?
Parse error: syntax error, unexpected 'Sns_Avaz_Model_Observer'
(T_STRING) in
/home/ganyobiclothing/public_html/app/code/local/Sns/Avaz/Model/Observer.php
on line 1
If this is the sns-avaz-responsive-magento-theme you should check the following page: http://themeforest.net/item/sns-avaz-responsive-magento-theme/11951628/comments
Hi,
This issue only happen with some hosting/server – it compress content file
We’ve fixed this issue on v1.0.1. Please try go to file: >/app/code/local/Sns/Avaz/Model/Observer.php open it and add space after re-save.
Ex: "<?php" ==> "<?php "
P/S: See my screenshot: http://take.ms/v8G03 and If your issue still … please
Thanks!
Source: http://themeforest.net/item/sns-avaz-responsive-magento-theme/11951628/comments
Good luck!
Parse error: syntax error, unexpected 'Sns_Avaz_Model_Observer' (T_STRING) in /home/ganyobiclothing/public_html/app/code/local/Sns/Avaz/Model/Observer.php on line 1
As its saying on line 1 so probably there is some white space or special character thats resulting in this.
I'm writing a small Ruby script that does a statistical analysis on a list of names generated by another script of mine.
When I run it with this command:
ruby [first script] [args] | ruby -- [second script] _
it throws this error:
./name_gen_test.rb:15:in `gets': No such file or directory # rb_sysopen - _ (Errno:ENOENT)
from .name_gen_test.rb:15:in `gets'
from .name_gen_test.rb:15:in `<main>'
(Apologies for typos; Powershell wouldn't let me copy/paste)
This is line 15:
until (cur_line = gets).nil?
Then there's the body of a loop, the rest of the code, etc. However, if I put this line:
gets
as the very first line, I get the same error. In fact, if I totally empty the file and have nothing but a call to gets, I get the error that the file '_' cannot be found.
How can I make it understand that '_' is a command line argument and not a file to be... read from, I guess? Why doesn't gets work like I expect it to (i.e. reading from the standard input)?
I'm running it with Powershell, if that makes a difference.
Sorry if this is a duplicate; simply Googling the error message leads to a dozen different issues and a dozen different solutions, none of which apply, and I couldn't figure out how to put this problem into a Google query.
STDIN.gets will do what you want. By default, gets is (pretty much) equivalent to ARGF.gets. ARGF reads from standard input if there are no ARGS, and from files that correspond to ARGS if there are.
Opening as admin and I get an invalid syntax on line 42 of the ini file.
"Too many environment strings" Then line 47 and other lines until it opens.
Any ideas as to why this may be happening?
Nothing appears out of the ordinary with the ini file.
Please try the solution in this kb article and see if it solves your problem:
http://support.microsoft.com/kb/159777/en-us
I am trying to compile a fortran code. It will analyze an X file in an Y directory and then create a new file Z with the results. But there is something wrong occurring.
When I write the directory I see that it is too much for one line and then I try to continue it in the next one doing this:
namech='/home/matheus/Documents/UFABC/IC/Spectra/Elliptical/'
+ 'espec.fits'
But, when I try to compile using the command
gfortran Codigo.f -o TESTE -Lcfitsio -lcfitsio
I get this error message:
+ 'espec.fits'
1
Error: Invalid character in name at (1)
Can someone help me? Actually I do not know what this error is. The directory is 100% right. And when I move the archives to a simpler directory to be able to write everything in one line, it works! So is there something wrong with the "+"?
Thank you.
Edit1
Actually, when I add "&" in the end of the line, it gives me this error message:
namech='/home/matheus/Documents/UFABC/IC/Spectra/Elliptical/'&
1
Error: Unclassifiable statement at (1)
Codigo.f:60.7:
+ 'espec.fits'
1
Error: Invalid character in name at (1)
And with "//":
namech='/home/matheus/Documents/UFABC/IC/Spectra/Elliptical/'//
1
Error: Syntax error in expression at (1)
Codigo.f:60.7:
+ 'espec.fits'
1
Error: Invalid character in name at (1)
Edit2
Thank you so much for helping me. Well, I solved the problem switching to the ".f90" form.
Just one more question: do you know why it does not recognize the "c" for comments in the code? Thank you again! :)
This part of your compilation statement:
gfortran Codigo.f
will treat the source file, with its .f suffix, as fixed form source. This means that a continuation line is indicated by any character (other than a blank or a 0) in column 6.
However, the error message you get suggests that the + in the second line of your snippet is not in column 6 and that the compiler is treating it as the initial character in a new entity name for which it is not valid. The fact that the + is aligned, vertically, with n in the previous line strengthens my suspicion that this may the root of your problem.
Adding the ampersand, as suggested in a now-deleted answer, doesn't actually help in this case if you continue to tell the compiler that it is dealing with a fixed form source file. & is only used for continuation in free form source files. Adding the string-concatenation operator, //, doesn't help either since it is not followed by another string but a line ending. //& would help but is probably unnecessary.
I think you have 2 possible solutions, but choose only one:
Stick with fixed form and get the alignment right.
Change the file suffix to .f90 which will cause gfortran to treat the source file as free-form.
If you go for option 2 (which I would recommend) you can then either use & at the end of the continued line or you could simply merge the lines. In free-form the maximum line length is 132 characters.
Adding to High Performance Mark's answer:
If you continue with FORTRAN 77, most compilers have an option to increase the allowed line length, e.g., -ffixed-form -ffixed-line-length-none for gfortran. As already stated, Fortran >=90 has line length of 132, so you wouldn't need to split the line.
Finally, if you want to split the line in Fortran >=90, you need two ampersands. In most cases you need one, but to split a string you need two:
namech='/home/matheus/Documents/UFABC/IC/Spectra/Elliptical/&
&espec.fits'