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)
Why I cannot install xvfb?
It seems the package xvfb uses the command "gpg" in the post install script. The gpg command seems to depend on libreadline, which does not seem to be compatible with gpg.
This is really strange. Usually a Debian/Ubuntu system does not install anything under /usr/local and the dependencies are in order. Could it be you have yourself installed libreadline into /usr/local/lib?
Ask the package manager which package owns the file /usr/local/lib/libreadline.so.6:
dpkg -S /usr/local/lib/libreadline.so.6
If it tells you a package where the file belongs, try to remove that package with
dpkg -P packagename
If no package owns it, remove the file.
If you want to keep /usr/local/lib/libreadline.so.6 and still have a working system, you should prevent programs from using it unless explicitly told to do so. You have probably modified the dynamic linker configuration in /etc/ld.so.conf. Undo those changes to get back to a working system.