![在 21.04 上运行 32 位程序](https://linux22.com/image/1207299/%E5%9C%A8%2021.04%20%E4%B8%8A%E8%BF%90%E8%A1%8C%2032%20%E4%BD%8D%E7%A8%8B%E5%BA%8F.png)
我是 Ubuntu 新手,可能犯了一个大错误,刚刚在一台旧电脑上安装了 Ubuntu 21.04,并试图在其上运行 32 位程序。查找后发现我必须运行以下命令才能使其与 64 位操作系统兼容。dpkg --add-architecture i386 apt install lib32z1
运行“dpkg --add-architecture i386”时我得到
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown option 'foreign-architecture'
查看有问题的文件“foreign-architecture i386”。运行“apt install lib.32z1”
root@g1gxb-ubuntu:/home/g1gxb# apt install lib32z1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
libllvm11
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libc6-i386
The following NEW packages will be installed
lib32z1 libc6-i386
0 to upgrade, 2 to newly install, 0 to remove and 0 not to upgrade.
Need to get 0 B/2,689 kB of archives.
After this operation, 13.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
dpkg: error: configuration error: /etc/dpkg/dpkg.cfg.d/multiarch:1: unknown
option 'foreign-architecture'
E: Sub-process /usr/bin/dpkg returned an error code (2)
我哪里做错了?
答案1
问题解决了。必须删除 /etc/dpkg/dpkg.cfg.d 中的两个文件,Multiarch 和 pkg-config-hook-config,然后一切正常