我无法在 ubuntu 中安装任何软件(来自软件中心),安装失败后,当我检查我的详细信息时,出现以下错误..请帮助我安装它,
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
我有以下 /etc/environment 的输出,那里已经安装了 java_home。
的输出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
我已经更新了语言支持并收到以下错误
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)
提前谢谢朋友们,
我不确定
/etc/environment
PAM 是如何应用的,但看起来它是有来源的。所以当它遇到这样一行时:由于 之前的空格, shell 将解释
JAVA_HOME
为命令=
,这是一个严重的错误,因为JAVA_HOME
在 PATH 中找不到也没有定义为别名或函数。a 中的错误source
导致 shell 退出(因为维护脚本以这种方式运行),这就是此错误停止安装的原因。(等效地,后面的空格=
使 shell 将其/usr/lib/jvm/jdk1.7.0/bin
视为命令,这还不错,但仍然是个问题。)所以正确的行是:几个月来我一直面临着同样的问题。一开始我没有注意,但当我下载更新但它们不会安装时,它开始令人不安。最后,我找到了解决方案。问题是
JAVA_HOME
. 我的路径是:我把它换成
所以,基本上我删除了引号和空格。
怎么做 ?
使用检查
PATH
和JAVA_HOME
路径变量它显示类似
.orig
我建议你在使用时备份原始环境变量用于
sudo nano command
强行改变变量路径通过删除引号和空格编辑路径后使用Ctrl+X退出,按Y确认并重命名新文件。
并再次检查路径。
现在更新和升级您的系统以获得流畅的性能和安装。