Estou usando o Ubuntu 10.04. Eu herdei esta configuração de um funcionário anterior que deveria estar administrando esta máquina, então não posso lhe dizer o que aconteceu na preparação para este problema.
Basicamente, o dpkg é de alguma forma quebrado além de qualquer função, ele não pode fazer nada. Consequentemente, todos os vários wrappers para o dpkg também falharam. Vamos dar um exemplo muito simples como apt-get install vim
.
apt-get install vim
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
adduser: Depends: perl-base (>= 5.6.0) but it is not going to be installed
Depends: debconf but it is not going to be installed or
debconf-2.0
bash-completion: Depends: bash (>= 3.1dfsg-9) but it is not going to be installed
bsdmainutils: Depends: debianutils (>= 1.8) but it is not going to be installed
ca-certificates: Depends: debconf (>= 0.5) but it is not going to be installed or
debconf-2.0
cron: Depends: debianutils (>= 1.7) but it is not going to be installed
debconf-i18n: Depends: debconf but it is not going to be installed
Depends: liblocale-gettext-perl but it is not going to be installed
gnupg: Depends: dpkg (>= 1.15.4) but it is not going to be installed or
install-info but it is not going to be installed
ifupdown: Depends: debconf (>= 1.2.0) but it is not going to be installed or
debconf-2.0
initramfs-tools: Depends: findutils (>= 4.2.24) but it is not going to be installed
Depends: util-linux (> 2.15~rc1) but it is not going to be installed
initscripts: Depends: mount (>= 2.11x-1) but it is not going to be installed
Depends: debianutils (>= 2.13.1) but it is not going to be installed
Recommends: e2fsprogs but it is not going to be installed
libc6: Depends: debconf (>= 0.5) but it is not going to be installed or
debconf-2.0
Depends: findutils (>= 4.4.0-2ubuntu2) but it is not going to be installed
libc6-dev: Depends: libc-dev-bin (= 2.11.1-0ubuntu7.12) but it is not going to be installed
Depends: linux-libc-dev but it is not going to be installed
Recommends: gcc but it is not going to be installed or
c-compiler
libgdbm3: Depends: dpkg (>= 1.15.4) but it is not going to be installed or
install-info but it is not going to be installed
libhtml-parser-perl: Depends: perlapi-5.10.0
libpam-runtime: Depends: debconf (>= 1.5.19) but it is not going to be installed
Depends: libpam-modules (>= 1.0.1-6) but it is not going to be installed
libpam0g: Depends: debconf (>= 0.5) but it is not going to be installed or
debconf-2.0
libssl0.9.8: Depends: debconf (>= 0.5) but it is not going to be installed or
debconf-2.0
libtext-charwidth-perl: Depends: perl-base (>= 5.10.0-24ubuntu4) but it is not going to be installed
Depends: perlapi-5.10.0
libtext-iconv-perl: Depends: perl-base (>= 5.10.0-24ubuntu4) but it is not going to be installed
Depends: perlapi-5.10.0
lsb-base: Depends: sed but it is not going to be installed
Depends: ncurses-bin but it is not going to be installed
mountall: Depends: coreutils (>= 7.1) but it is not going to be installed
passwd: Depends: libpam-modules but it is not going to be installed
Depends: debianutils (>= 2.15.2) but it is not going to be installed
perl: Depends: perl-base (= 5.10.1-8ubuntu2.3) but it is not going to be installed
python-minimal: Depends: dpkg (>= 1.13.20) but it is not going to be installed
readline-common: Depends: dpkg (>= 1.15.4) but it is not going to be installed or
install-info but it is not going to be installed
snort-rules-default: Depends: debconf (>= 0.2.80) but it is not going to be installed or
debconf-2.0
sysv-rc: Depends: debconf but it is not going to be installed or
debconf-2.0
tzdata: Depends: debconf (>= 0.5) but it is not going to be installed or
debconf-2.0
ucf: Depends: debconf (>= 1.5.19) but it is not going to be installed
Depends: coreutils (>= 5.91) but it is not going to be installed
udev: Depends: util-linux (> 2.15~rc2) but it is not going to be installed
vim: Depends: vim-common (= 2:7.2.330-1ubuntu3.1) but it is not going to be installed
Depends: vim-runtime (= 2:7.2.330-1ubuntu3.1) but it is not going to be installed
Depends: libpython2.6 (>= 2.6) but it is not going to be installed
wget: Depends: dpkg (>= 1.15.4) but it is not going to be installed or
install-info but it is not going to be installed
xml-core: Depends: sed (>= 4.1.2-8) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Sim, tentei apt-get if install
e, previsivelmente, não fez nada útil
apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: base-files bash coreutils dash debconf debianutils dpkg findutils gawk libc-dev-bin liblocale-gettext-perl libpam-modules linux-libc-dev manpages manpages-dev mount ncurses-bin perl-base sed util-linux Suggested packages: bash-doc debconf-doc debconf-utils whiptail dialog gnome-utils libterm-readline-gnu-perl libgnome2-perl libnet-ldap-perl mlocate locate slocate man-browser nfs-common util-linux-locales kbd console-tools dosfstools The following NEW packages will be installed: base-files bash coreutils dash debconf debianutils dpkg findutils gawk libc-dev-bin liblocale-gettext-perl libpam-modules linux-libc-dev manpages manpages-dev mount ncurses-bin perl-base sed util-linux 0 upgraded, 20 newly installed, 0 to remove and 7 not upgraded. 150 not fully installed or removed. Need to get 13.4MB of archives. After this operation, 49.6MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://mirrors.voxel.net/ubuntu/ lucid-updates/main coreutils 7.4-2ubuntu3 [2,907kB] Get:2 http://mirrors.voxel.net/ubuntu/ lucid-updates/main dpkg 1.15.5.6ubuntu4.6 [2,252kB] Get:3 http://mirrors.voxel.net/ubuntu/ lucid-updates/main perl-base 5.10.1-8ubuntu2.3 [1,084kB] Get:4 http://mirrors.voxel.net/ubuntu/ lucid/main liblocale-gettext-perl 1.05-6 [22.0kB] Get:5 http://mirrors.voxel.net/ubuntu/ lucid/main debconf 1.5.28ubuntu4 [148kB] Get:6 http://mirrors.voxel.net/ubuntu/ lucid/main findutils 4.4.2-1ubuntu1 [480kB] Get:7 http://mirrors.voxel.net/ubuntu/ lucid/main gawk 1:3.1.6.dfsg-4build1 [550kB] Get:8 http://mirrors.voxel.net/ubuntu/ lucid-updates/main base-files 5.0.0ubuntu20.10.04.5 [70.3kB] Get:9 http://mirrors.voxel.net/ubuntu/ lucid-updates/main libpam-modules 1.1.1-2ubuntu5.6 [392kB] Get:10 http://mirrors.voxel.net/ubuntu/ lucid/main debianutils 3.2.2 [50.0kB] Get:11 http://mirrors.voxel.net/ubuntu/ lucid-updates/main mount 2.17.2-0ubuntu1.10.04.2 [183kB] Get:12 http://mirrors.voxel.net/ubuntu/ lucid/main sed 4.2.1-6 [180kB] Get:13 http://mirrors.voxel.net/ubuntu/ lucid/main ncurses-bin 5.7+20090803-2ubuntu3 [312kB] Get:14 http://mirrors.voxel.net/ubuntu/ lucid-updates/main util-linux 2.17.2-0ubuntu1.10.04.2 [572kB] Get:15 http://mirrors.voxel.net/ubuntu/ lucid/main dash 0.5.5.1-3ubuntu2 [105kB] Get:16 http://mirrors.voxel.net/ubuntu/ lucid/main bash 4.1-2ubuntu3 [702kB] Get:17 http://mirrors.voxel.net/ubuntu/ lucid-updates/main libc-dev-bin 2.11.1-0ubuntu7.12 [225kB] Get:18 http://mirrors.voxel.net/ubuntu/ lucid-updates/main linux-libc-dev 2.6.32-50.112 [870kB] Get:19 http://mirrors.voxel.net/ubuntu/ lucid/main manpages 3.23-1 [716kB] Get:20 http://mirrors.voxel.net/ubuntu/ lucid/main manpages-dev 3.23-1 [1,547kB] Fetched 13.4MB in 1s (8,720kB/s) E: Could not perform immediate configuration on already unpacked 'libattr1'.Please see man 5 apt.conf under APT::Immediate-Configure for details.
E sim, tentei apt-get install -o APT::Immediate-Configure=false -f
, o que resulta no erro:
E: Couldn't configure pre-depend perl-base for liblocale-gettext-perl, probably a dependency cycle.
E sim, tentei todos os tipos de apt-get clean
apt-get autoclean
apt-get update
e apt-get upgrade
todos sem resultados úteis.
Eu também inspecionei o arquivo sources.list e ele parece saudável para minha versão do Ubuntu.
Minhas observações: Algo está muito errado, porque está falhando em reconhecer que muitos pacotes já estão instalados. Bash, por exemplo, está definitivamente instalado. Então é perl. Então é adduser ... e quando tentei usar o aptitude para consertar o problema, a interface do aptitude relatou que um dos pacotes recém-instalados que iria instalar era o aptitutde. De qualquer forma, previsivelmente, o aptitude falhou.
Então, qual é o meu próximo curso de ação aqui?