Saturday, May 4, 2024
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3066  / 2 Years ago, sun, april 24, 2022, 7:13:58

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:/u‌​sr/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,


More From » software-installation

 Answers
3

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:



JAVA_HOME =/usr/lib/jvm/jdk1.7.0/bin


the shell will interpret JAVA_HOME as a command because of the space before =, which is a grave error since JAVA_HOME is not found in the PATH nor defined as an alias or function. An error in a source 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:



JAVA_HOME=/usr/lib/jvm/jdk1.7.0/bin

[#23519] Sunday, April 24, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dresuitable

Total Points: 69
Total Questions: 116
Total Answers: 122

Location: Honduras
Member since Sun, Dec 26, 2021
2 Years ago
;