加载共享库时出错:libz.so.1:

加载共享库时出错:libz.so.1:

我遇到了这个错误“加载共享库时出错:libz.so.1:”. 所以我安装这个包 apt-get install zlib1g: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:
 libssl-dev : Depends: libssl1.0.0 (= 1.0.2g-1ubuntu4.8) but 1.0.2g-1ubuntu4.10 is to be installed
              Depends: zlib1g-dev but it is not going to be installed
              Breaks: libssl-dev:i386 (!= 1.0.2g-1ubuntu4.8) but 1.1.0g-2.1+ubuntu16.04.1+deb.sury.org+1 is to be installed
 libssl-dev:i386 : Breaks: libssl-dev (!= 1.1.0g-2.1+ubuntu16.04.1+deb.sury.org+1) but 1.0.2g-1ubuntu4.8 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

这是我的操作系统

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

我尝试了 apt-get -f install,结果如下

(Reading database ... 129365 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.1.0g-2.1+ubuntu16.04.1+deb.sury.org+1_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.0g-2.1+ubuntu16.04.1+deb.sury.org+1) over (1.0.2g-1ubuntu4.8) ...
dpkg: error processing archive /var/cache/apt/archives/libssl-dev_1.1.0g-2.1+ubuntu16.04.1+deb.sury.org+1_amd64.deb (--unpack):
 trying to overwrite shared '/usr/include/openssl/e_os2.h', which is different from other instances of package libssl-dev:amd64
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/libssl-dev_1.1.0g-2.1+ubuntu16.04.1+deb.sury.org+1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

先感谢您。

答案1

尽管没有提出问题,但我认为您想继续apt-get install zlib1g:i386

sudo apt-get -f install按照建议的方式操作。这应该可以修复您的依赖系统。

sudo apt-get -f install 到底起什么作用?

相关内容