Eu não posso atualizar ou instalar nenhum pacote até que eu atualize o libc6 e ele não possa ser atualizado enquanto o LD_LIBRARY_PATH aponta para o diretório / lib. O problema é que eu tentei editar ~ / .zshenv, ~ / .profile e /etc/init.conf para incluir a linha LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib/i386-linux-gnu
. Eu tentei executar export LD_LIBRARY_PATH=/lib/x86_64-linux-gnu:/lib/i386-linux-gnu
e apenas export LD_LIBRARY_PATH=
. Todos eles alteram a saída quando eu chamo echo $LD_LIBRARY_PATH
, mas isso não afeta as mensagens de erro do apt-get.
Tentando atualizar a libc6 com sudo apt-get -f install
:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
libc6 libc6:i386 libstdc++6:i386
Suggested packages:
glibc-doc glibc-doc:i386 locales:i386
The following NEW packages will be installed:
libc6:i386 libstdc++6:i386
The following packages will be upgraded:
libc6
1 upgraded, 2 newly installed, 0 to remove and 24 not upgraded.
3 not fully installed or removed.
Need to get 0 B/5,274 kB of archives.
After this operation, 11.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
(Reading database ... 301724 files and directories currently installed.)
Preparing to unpack .../libc6_2.23-0ubuntu5_amd64.deb ...
LD_LIBRARY_PATH contains the traditional /lib directory,
but not the multiarch directory /lib/x86_64-linux-gnu.
It is not safe to upgrade the C library in this situation;
please remove the /lib/directory from LD_LIBRARY_PATH and
try again.
dpkg: error processing archive /var/cache/apt/archives/libc6_2.23-0ubuntu5_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Preparing to unpack .../libc6_2.23-0ubuntu5_i386.deb ...
De-configuring libc6:amd64 (2.23-0ubuntu4) ...
LD_LIBRARY_PATH contains the traditional /lib directory,
but not the multiarch directory /lib/i386-linux-gnu.
It is not safe to upgrade the C library in this situation;
please remove the /lib/directory from LD_LIBRARY_PATH and
try again.
dpkg: error processing archive /var/cache/apt/archives/libc6_2.23-0ubuntu5_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.23-0ubuntu5_amd64.deb
/var/cache/apt/archives/libc6_2.23-0ubuntu5_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Mas quando eu corro echo $LD_LIBRARY_PATH
:
/lib/x86_64-linux-gnu:/lib/i386-linux-gnu
Em esta questão semelhante Andrea Corbellini sugere que um script pode estar alterando o LD_LIBRARY_PATH e recomenda executar grep -r LD_LIBRARY_PATH / 2> /dev/null
para determinar o que poderia estar mudando e por quê. Isso é muito lento e ainda está em execução enquanto estou escrevendo isso, mas a saída até agora é:
Binary file /proc/1576/task/1576/environ matches
Binary file /proc/1576/environ matches
Binary file /proc/1658/task/1658/environ matches
Binary file /proc/1658/environ matches
Binary file /proc/1666/task/1666/environ matches
Binary file /proc/1666/environ matches
Binary file /proc/1678/task/1678/environ matches
Binary file /proc/1678/environ matches
Binary file /proc/1698/task/1698/environ matches
Binary file /proc/1698/task/1717/environ matches
Binary file /proc/1698/task/1718/environ matches
Binary file /proc/1698/environ matches
Binary file /proc/1720/task/1720/environ matches
Binary file /proc/1720/task/1721/environ matches
Binary file /proc/1720/task/1722/environ matches
Binary file /proc/1720/environ matches
Binary file /proc/1726/task/1726/environ matches
Binary file /proc/1726/task/1735/environ matches
Binary file /proc/1726/task/1736/environ matches
Binary file /proc/1726/task/1737/environ matches
Binary file /proc/1726/task/1738/environ matches
Binary file /proc/1726/task/1751/environ matches
Binary file /proc/1726/environ matches
Binary file /proc/1733/task/1733/environ matches
Binary file /proc/1733/task/1748/environ matches
Binary file /proc/1733/task/1749/environ matches
Binary file /proc/1733/task/1757/environ matches
Binary file /proc/1733/environ matches
Binary file /proc/1740/task/1740/environ matches
Binary file /proc/1740/task/1765/environ matches
Binary file /proc/1740/task/1769/environ matches
A pesquisa dos pids revela que esses processos são:
upstart
upstart-udev-br
dbus-daemon
window-stack-br
ibus-daemon
gvfsd
gvfsd-fuse
ibust-dconf
ibus-ui-gtk3
Claro que cada um desses arquivos do ambiente tinha a linha LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
em algum lugar neles. Parece que esses processos estão, de alguma forma, substituindo quaisquer alterações que eu faça em ~ / .zshenv ou ~ / .profile ou sempre que eu chamar exportação. Alguém sabe como fazer isso parar?
Peço desculpas se algo estiver errado com essa pergunta ou se ela for muito semelhante à pergunta semelhante a que fiz referência acima, mas achei que isso poderia ser mais específico. Esta é a minha primeira vez postando no askubuntu.
-> dpkg --print-foreign-architectures
i386
-> cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"