1

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 the LC_ALL error by using the command sudo dpkg-reconfigure locales and sudo aptitude install locales and it worked. Then I tried to install terminal by using the command apt install gnome-terminal but it gives the error

Setting 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.

  • According to the error message, you have an unterminated quoted string in your /etc/environment file. Did you look at that? – Kusalananda Jul 6 '18 at 5:54
  • My /etc/environment file looks like this 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" – usamypwd Jul 6 '18 at 6:02
  • The :/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. – Kusalananda Jul 6 '18 at 6:09
1

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"
  • I have changed JAVA_HOME="/usr/java/jre1.8.0_171" toJAVA_HOME="/usr/java/jre1.8.0_171/java" and PATH – usamypwd Jul 6 '18 at 6:50
  • @UjjwalSingh Since I'm not a Java user, I can't say whether that is correct or not. – Kusalananda Jul 6 '18 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.