I am not able to install any software (from software center) in ubuntu, after installing it gets failed and when i checked i detail, below error is coming .. please help me out for installing it,
installArchives() failed: perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN.ISO8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: JAVA_HOME: command not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
install-info
Error in function:
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: JAVA_HOME: command not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 127
I have following output for /etc/environment, java_home is already installed there.
output of cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
JAVA_HOME =/usr/lib/jvm/jdk1.7.0/bin
I have updated the language support and getting the below error
amulbhatia@Nadar:~$ sudo apt-get install language-pack-en
[sudo] password for amulbhatia:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
kde-l10n-engb
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
language-pack-en-base
The following packages will be upgraded:
language-pack-en language-pack-en-base
2 upgraded, 0 newly installed, 0 to remove and 321 not upgraded.
1 not fully installed or removed.
Need to get 0 B/459 kB of archives.
After this operation, 1,421 kB disk space will be freed.
Do you want to continue? [Y/n] y
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: JAVA_HOME: command not found
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 127
E: Sub-process /usr/bin/dpkg returned an error code (1)
Thanks in advance friends,
I am not sure of how
/etc/environment
is applied by PAM, but it looks like it is sourced. So when it encounters a line like:the shell will interpret
JAVA_HOME
as a command because of the space before=
, which is a grave error sinceJAVA_HOME
is not found in the PATH nor defined as an alias or function. An error in asource
causes the shell to exit (since maintenance scripts are run that way), which is why this error stopped installations. (Equivalently, a space after=
causes the shell to see/usr/lib/jvm/jdk1.7.0/bin
as a command, which is not that bad, but still a problem.) So the correct line is:I was facing the same problem for many months. I didn't give attention at first but it started troubling when I would download updates and they won't install. Finally, I found the solution. The problem was the path of
JAVA_HOME
. My path was:I replaced it with
So, basically I removed the quotes and the spaces.
How to do it ?
Check the
PATH
andJAVA_HOME
path variables by usingIt shows something like
I suggest you to take a back up of the original environment variable in
.orig
usinguse
sudo nano command
to forcefully change the variable pathAfter editing the path by removing quotes and spaces use Ctrl+X to exit, press Y to confirm and rename the new file.
and check the path again.
Now update and upgrade your system for smooth performance and installations.