[Resolvido agora]
Eu tenho uma máquina com 14.04 LTS x64.
Alguém tentou instalar um pacote errado, libx32z1-dev:i386
, e isso parece ter atrapalhado algumas coisas. Ele removeu um monte de pacotes importantes por algum motivo (transcrição abaixo), e agora, quando executo o comando apt-get install
/ remove
, recebo algo assim:
$ sudo apt-get install gcc-4.6
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:
gcc-4.6 : Depends: binutils (>= 2.24) but it is not going to be installed
libc6-dev-x32:i386 : Depends: libc6-dev-amd64:i386 (= 2.19-0ubuntu6.14) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
( gcc-4.6
foi removido durante a tentativa de instalação)
Encontrei algumas perguntas semelhantes (como Como recuperar de um problema do apt-get ), mas as soluções não funcionam:
$ sudo apt-get remove libc6-amd64:i386 libc6-dev-amd64:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libc6-amd64:i386' is not installed, so not removed
Package 'libc6-dev-amd64:i386' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libc6-dev-x32:i386 : Depends: libc6-dev-amd64:i386 (= 2.19-0ubuntu6.14) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Usar dpkg
diretamente não ajuda:
sudo dpkg --purge libc6-dev-amd64:i386
dpkg: warning: ignoring request to remove libc6-dev-amd64 which isn't installed
sudo dpkg --purge libc6-amd64:i386
(Reading database ... 567282 files and directories currently installed.)
Removing libc6-amd64 (2.19-0ubuntu6.14) ...
Purging configuration files for libc6-amd64 (2.19-0ubuntu6.14) ...
Processing triggers for libc-bin (2.19-0ubuntu6.14) ...
Se eu fizer o que o APT sugere, então:
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
at augeas-lenses binutils:i386 bridge-utils cpp-4.6 cpu-checker cryptsetup
debugedit dh-apparmor ebtables fakeroot gcc-4.6-base ipxe-qemu jfsutils
ldmtool ledit lib32asan0 lib32atomic1 lib32gcc1 lib32gomp1 lib32itm1
lib32quadmath0 lib32stdc++6 lib64asan0:i386 lib64atomic1:i386
lib64gcc-4.8-dev:i386 lib64gcc1:i386 lib64gomp1:i386 lib64itm1:i386
lib64quadmath0:i386 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libasan0:i386 libatomic1:i386 libaugeas0
libclang-common-3.5-dev libclang1-3.5 libcloog-isl4:i386 libconfig9
libdevmapper-event1.02.1 libfakeroot libfontconfig1-dev libfreetype6-dev
libgcc-4.8-dev:i386 libgd-gd2-perl libgfortran-4.8-dev libgmp10:i386
libgomp1:i386 libhivex0 libice-dev libisl10:i386 libitm1:i386 libldm-1.0-0
libllvm3.5 libltdl-dev libmail-sendmail-perl libmpc3:i386 libmpfr4:i386
libnetcf1 libnetpbm10 libquadmath0:i386 librpmbuild3 librpmsign1 libsm-dev
libstring-shellquote-perl libsys-hostname-long-perl libsys-virt-perl
libvirt-bin libvirt0 libwin-hivex-perl libx32asan0:i386 libx32atomic1:i386
libx32gcc-4.8-dev:i386 libx32gcc1:i386 libx32gomp1:i386 libx32itm1:i386
libx32quadmath0:i386 libxft-dev libxml-xpath-perl libxrender-dev libxss-dev
libxt-dev linux-image-4.4.0-38-generic linux-image-extra-4.4.0-38-generic
llvm-3.5 llvm-3.5-dev llvm-3.5-runtime llvm-3.6 llvm-3.6-dev
llvm-3.6-runtime lsb-security lvm2 msr-tools netpbm ocaml-base-nox pax
po-debconf qemu-system-x86 rpm scrub seabios supermin watershed
x11proto-render-dev x11proto-scrnsaver-dev zerofree zfs-fuse
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libc6-amd64:i386 libc6-dev-amd64:i386
Recommended packages:
gcc-multilib:i386
The following NEW packages will be installed:
libc6-amd64:i386 libc6-dev-amd64:i386
0 upgraded, 2 newly installed, 0 to remove and 27 not upgraded.
8 not fully installed or removed.
Need to get 0 B/3,872 kB of archives.
After this operation, 20.6 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Selecting previously unselected package libc6-amd64.
(Reading database ... 566979 files and directories currently installed.)
Preparing to unpack .../libc6-amd64_2.19-0ubuntu6.14_i386.deb ...
Unpacking libc6-amd64 (2.19-0ubuntu6.14) ...
Replaced by files in installed package libc6:amd64 (2.19-0ubuntu6.14) ...
Selecting previously unselected package libc6-dev-amd64.
Preparing to unpack .../libc6-dev-amd64_2.19-0ubuntu6.14_i386.deb ...
Unpacking libc6-dev-amd64 (2.19-0ubuntu6.14) ...
dpkg: error processing archive /var/cache/apt/archives/libc6-dev-amd64_2.19-0ubuntu6.14_i386.deb (--unpack):
trying to overwrite '/usr/include/fpu_control.h', which is also in package libc6-dev-i386 2.19-0ubuntu6.14
Errors were encountered while processing:
/var/cache/apt/archives/libc6-dev-amd64_2.19-0ubuntu6.14_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A tentativa original de instalação incluiu essas outras etapas, além da grande lista de coisas que seriam autorizadas:
The following extra packages will be installed:
libc6-amd64:i386 libc6-dev:i386 libc6-dev-amd64:i386 libc6-dev-x32:i386
libc6-x32:i386 libx32z1:i386 linux-libc-dev linux-libc-dev:i386
zlib1g-dev:i386
Suggested packages:
glibc-doc:i386 manpages-dev:i386
Recommended packages:
gcc:i386 c-compiler:i386 gcc-multilib:i386
The following packages will be REMOVED:
alien binutils build-essential camlp4 clang-3.5 clang-3.6 debhelper dkms
dpkg-dev g++ g++-4.8 g++-4.8-multilib g++-multilib gcc gcc-4.6
gcc-4.6-multilib gcc-4.8 gcc-4.8-multilib gcc-multilib gfortran gfortran-4.8
hardening-includes lcov lib32gcc-4.8-dev lib32stdc++-4.8-dev libc6-dev-x32
libc6-x32 libguestfs-dev libguestfs-perl libguestfs-tools libguestfs0
libtool libx32asan0 libx32atomic1 libx32gcc-4.8-dev libx32gcc1 libx32gomp1
libx32itm1 libx32quadmath0 libx32stdc++-4.8-dev libx32stdc++6 libx32z1
libx32z1-dev lintian lsb-core network-manager-pptp
network-manager-pptp-gnome ocaml-compiler-libs ocaml-interp ocaml-nox
pptp-linux python-guestfs tcl-dev tcl8.6-dev tk-dev tk8.6-dev
The following NEW packages will be installed:
libc6-amd64:i386 libc6-dev:i386 libc6-dev-amd64:i386 libc6-dev-x32:i386
libc6-x32:i386 libx32z1:i386 libx32z1-dev:i386 linux-libc-dev:i386
zlib1g-dev:i386
The following packages will be upgraded:
linux-libc-dev
Esta pergunta, dpkg error: "tentando sobrescrever arquivo, que também está em ... ", tem uma resposta que diz para remover o pacote em conflito. Padrão correspondente à saída apt, parece que é libc6-dev-i386
e libc6-dev-amd64
.
Mas parece que não consigo removê-lo:
$ sudo apt-get remove libc6-dev-i386
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:
lib32ncurses5-dev : Depends: lib32c-dev
lib32tinfo-dev : Depends: lib32c-dev
lib32z1-dev : Depends: lib32c-dev
libc6-dev-x32:i386 : Depends: libc6-dev-amd64:i386 (= 2.19-0ubuntu6.14) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
$ sudo dpkg --purge libc6-dev-i386
dpkg: dependency problems prevent removal of libc6-dev-i386:
lib32ncurses5-dev depends on lib32c-dev; however:
Package lib32c-dev is not installed.
Package libc6-dev-i386 which provides lib32c-dev is to be removed.
lib32z1-dev depends on lib32c-dev; however:
Package lib32c-dev is not installed.
Package libc6-dev-i386 which provides lib32c-dev is to be removed.
lib32tinfo-dev depends on lib32c-dev; however:
Package lib32c-dev is not installed.
Package libc6-dev-i386 which provides lib32c-dev is to be removed.
dpkg: error processing package libc6-dev-i386 (--purge):
dependency problems - not removing
Errors were encountered while processing:
libc6-dev-i386
$ sudo apt-get remove libc6-dev-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'libc6-dev-amd64:i386' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libc6-dev-x32:i386 : Depends: libc6-dev-amd64:i386 (= 2.19-0ubuntu6.14) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
$ sudo dpkg --purge libc6-dev-amd64
dpkg: warning: ignoring request to remove libc6-dev-amd64 which isn't installed
Ou também estou fazendo a coisa errada e não vejo como aplicar essa solução.