为什么安装 32 位软件包会删除 64 位软件包?

为什么安装 32 位软件包会删除 64 位软件包?

我不清楚为什么安装 32 位软件包需要删除 64 位软件包。

例如,如果我尝试安装 libcurl 的 32 位开发包,apt-get 会提示它将删除几个 64 位包,包括gcc

$ sudo apt-get install libcurl4-openssl-dev:i386
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  g++-4.8 gcc-4.8 libasan0 libasan0:i386 libatomic1 libatomic1:i386 libc6-dev
  libcloog-isl4:i386 libgcc-4.8-dev libgcc-4.8-dev:i386 libgmp10:i386 libgomp1
  libgomp1:i386 libisl10:i386 libitm1 libitm1:i386 libmpc3:i386 libmpfr4:i386
  libquadmath0 libquadmath0:i386 libstdc++-4.8-dev libtsan0 linux-libc-dev
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  comerr-dev:i386 gcc-4.8-base:i386 gcc-4.9-base:i386 krb5-multidev:i386
  libasn1-8-heimdal:i386 libc6:i386 libc6-dev:i386 libcomerr2:i386
  libcurl3:i386 libdb5.3:i386 libffi6:i386 libgcc1:i386 libgcrypt11:i386
  libgcrypt11-dev:i386 libgnutls-dev:i386 libgnutls-openssl27:i386
  libgnutls26:i386 libgnutlsxx27:i386 libgpg-error-dev:i386 libgpg-error0:i386
  libgssapi-krb5-2:i386 libgssapi3-heimdal:i386 libgssrpc4:i386
  libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386
  libhx509-5-heimdal:i386 libidn11:i386 libidn11-dev:i386 libk5crypto3:i386
  libkadm5clnt-mit9:i386 libkadm5srv-mit9:i386 libkdb5-7:i386
  libkeyutils1:i386 libkrb5-26-heimdal:i386 libkrb5-3:i386 libkrb5-dev:i386
  libkrb5support0:i386 libldap-2.4-2 libldap-2.4-2:i386 libldap2-dev:i386
  libp11-kit-dev:i386 libp11-kit0:i386 libroken18-heimdal:i386
  librtmp-dev:i386 librtmp0:i386 libsasl2-2:i386 libsasl2-modules:i386
  libsasl2-modules-db:i386 libsqlite3-0:i386 libssl-dev:i386 libssl1.0.0:i386
  libstdc++6:i386 libtasn1-6:i386 libtasn1-6-dev:i386 libwind0-heimdal:i386
  linux-libc-dev:i386 pkg-config zlib1g:i386 zlib1g-dev:i386
Suggested packages:
  doc-base:i386 krb5-doc:i386 glibc-doc:i386 locales:i386 manpages-dev:i386
  libcurl4-doc:i386 libcurl3-dbg:i386 rng-tools:i386 libgcrypt11-doc:i386
  gnutls26-doc:i386 gnutls-bin:i386 krb5-user:i386 libsasl2-modules-otp:i386
  libsasl2-modules-ldap:i386 libsasl2-modules-sql:i386
  libsasl2-modules-gssapi-mit:i386 libsasl2-modules-gssapi-heimdal:i386
Recommended packages:
  gcc:i386 c-compiler:i386 libssl-doc:i386
The following packages will be REMOVED:
  cpp g++ gcc
The following NEW packages will be installed:
  comerr-dev:i386 gcc-4.8-base:i386 gcc-4.9-base:i386 krb5-multidev:i386
  libasn1-8-heimdal:i386 libc6:i386 libc6-dev:i386 libcomerr2:i386
  libcurl3:i386 libcurl4-openssl-dev:i386 libdb5.3:i386 libffi6:i386
  libgcc1:i386 libgcrypt11:i386 libgcrypt11-dev:i386 libgnutls-dev:i386
  libgnutls-openssl27:i386 libgnutls26:i386 libgnutlsxx27:i386
  libgpg-error-dev:i386 libgpg-error0:i386 libgssapi-krb5-2:i386
  libgssapi3-heimdal:i386 libgssrpc4:i386 libhcrypto4-heimdal:i386
  libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386 libhx509-5-heimdal:i386
  libidn11:i386 libidn11-dev:i386 libk5crypto3:i386 libkadm5clnt-mit9:i386
  libkadm5srv-mit9:i386 libkdb5-7:i386 libkeyutils1:i386
  libkrb5-26-heimdal:i386 libkrb5-3:i386 libkrb5-dev:i386 libkrb5support0:i386
  libldap-2.4-2:i386 libldap2-dev:i386 libp11-kit-dev:i386 libp11-kit0:i386
  libroken18-heimdal:i386 librtmp-dev:i386 librtmp0:i386 libsasl2-2:i386
  libsasl2-modules:i386 libsasl2-modules-db:i386 libsqlite3-0:i386
  libssl-dev:i386 libssl1.0.0:i386 libstdc++6:i386 libtasn1-6:i386
  libtasn1-6-dev:i386 libwind0-heimdal:i386 linux-libc-dev:i386 pkg-config
  zlib1g:i386 zlib1g-dev:i386
The following packages will be upgraded:
  libldap-2.4-2
1 upgraded, 60 newly installed, 3 to remove and 28 not upgraded.
Need to get 15.1 MB of archives.
After this operation, 54.8 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.

多架构支持似乎已启用:

$ dpkg --print-foreign-architectures
i386

我需要在同一开发机上使用 64 位和 32 位软件包。我认为这应该很简单。我误解了什么?我需要做什么才能安装 32 位软件包而不删除关键的 64 位软件包?

答案1

不要安装 32 位 *-dev 软件包。dev 几乎总是只是头文件。而且头文件对于所有架构几乎总是相同的。

只需安装 32 位库。在本例中是 libcurl3。

相关内容