1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libruby1.8
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  xserver-common
The following NEW packages will be installed:
  xvfb
The following packages will be upgraded:
  xserver-common
1 upgraded, 1 newly installed, 0 to remove and 308 not upgraded.
1 not fully installed or removed.
Need to get 0 B/899 kB of archives.
After this operation, 2,068 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Setting up apt (0.8.16~exp5ubuntu13.2) ...
gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
gpg: symbol lookup error: /usr/local/lib/libreadline.so.6: undefined symbol: UP
dpkg: error processing apt (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 apt
E: Sub-process /usr/bin/dpkg returned an error code (1)

为什么我无法安装 xvfb?

4

2 回答 2

2

让你的管理员运行这个:

su
mkdir temp
mv /usr/local/lib/libreadline* temp
ldconfig 
apt-get update

然后再次运行你的 apt-get

于 2012-04-03T20:58:22.560 回答
1

似乎包 xvfb 在安装后脚本中使用了命令“gpg”。gpg 命令似乎依赖于 libreadline,它似乎与 gpg 不兼容。

这真的很奇怪。通常 Debian/Ubuntu 系统不会在 /usr/local 下安装任何东西,并且依赖项是有序的。可能是您自己将 libreadline 安装到 /usr/local/lib 中吗?

询问包管理器哪个包拥有文件 /usr/local/lib/libreadline.so.6:

dpkg -S /usr/local/lib/libreadline.so.6

如果它告诉您文件所属的包,请尝试删除该包

dpkg -P packagename

如果没有包拥有它,请删除该文件。

如果你想保留 /usr/local/lib/libreadline.so.6 并且仍然有一个工作系统,你应该阻止程序使用它,除非明确告知这样做。您可能已经修改了 /etc/ld.so.conf 中的动态链接器配置。撤消这些更改以恢复正常工作的系统。

于 2012-04-03T20:57:58.817 回答