我不知道发生了什么,但突然毫无原因地无法安装任何应用程序和软件包。当我想安装软件包时,sudo apt-get install <package>
出现此错误:
mpiuser@host:~$ sudo apt-get install synaptic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
libpango-perl librarian0 rarian-compat sgml-data
Suggested packages:
docbook docbook-dsssl docbook-xsl docbook-defguide libfont-freetype-perl
libgtk2-perl-doc perlsgml w3-recs opensp libxml2-utils dwww menu deborphan tasksel
The following NEW packages will be installed:
docbook-xml libcairo-perl libept1.4.12 libglib-perl libgtk2-perl
libpango-perl librarian0 rarian-compat sgml-data synaptic
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/3,441 kB of archives.
After this operation, 17.4 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up install-info (5.2.0.dfsg.1-2) ...
/etc/environment: line 2: /home/mpiuser/mpich1/bin: Is a directory
dpkg: error processing package install-info (--configure):
subprocess installed post-installation script returned error exit status 126
E: Sub-process /usr/bin/dpkg returned an error code (1)
当我想从 Ubuntu 软件中心安装应用程序时,这也是正确的。
错误消息如下:
我该怎么办?我不想重新安装我的 ubuntu。
答案1
此代码解决了我的问题
sudo mv /var/lib/dpkg/info/install-info.postinst /var/lib/dpkg/info/install-info.postinst.bad