Syntax error: Unterminated quoted string
The thing about error messages is that they tell you what's wrong.
Your error message clearly says that there is an unterminated quoted string in /etc/environment
. Once you read that, you should investigate that file to see if it looks odd with regards to double quotes.
In a comment, you mention that your /etc/environment
file has the contents:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" :/usr/java/jre1.8.0_171/bin"
JAVA_HOME="/usr/java/jre1.8.0_171"
(or something similar, formatting is difficult in comments).
Here, you can clearly see that the :/usr/java/jre1.8.0_171/bin"
bit at the end of the first line looks out of place (and a space too many).
You, or a script, have edited the file and messed up the PATH
. That line now contains an unbalanced double quote.
My guess is that the PATH
should be set as:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/java/jre1.8.0_171/bin"
Related videos on Youtube
Comments
-
user over 1 year
I was updating my linux mint 18.3 to linux mint 19. The error I get is
Cannot set LC_ALL to default locale: No such file or directory
. Then I Restarted my System, after that I can't open the terminal. I used Ctrl+Alt+F3 to run command line and fixing theLC_ALL
error by using the commandsudo dpkg-reconfigure locales
andsudo aptitude install locales
and it worked. Then I tried to install terminal by using the commandapt install gnome-terminal
but it gives the errorSetting up install-info (6.5.0.dfsg.1-2) ... /usr/sbin/update-info-dir: 5: /etc/environment: Syntax error: Unterminated quoted string dpkg: error processing package install-info (--configure): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: install-info E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried to resolve that using this https://askubuntu.com/a/920076/842467 but nothing happened.
-
Kusalananda almost 6 yearsAccording to the error message, you have an unterminated quoted string in your
/etc/environment
file. Did you look at that? -
user almost 6 yearsMy
/etc/environment
file looks like thisPATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" :/usr/java/jre1.8.0_171/bin" JAVA_HOME="/usr/java/jre1.8.0_171"
-
Kusalananda almost 6 yearsThe
:/usr/java/jre1.8.0_171/bin"
bit looks out of place. Please add the contents of/etc/environment
to the question so that we can see what it actually looks like.
-
-
user almost 6 yearsI have changed
JAVA_HOME="/usr/java/jre1.8.0_171"
toJAVA_HOME="/usr/java/jre1.8.0_171/java"
andPATH
-
Kusalananda almost 6 years@UjjwalSingh Since I'm not a Java user, I can't say whether that is correct or not.