我在 x86_64 机器上运行
uname -a
返回
5.4.0-135-generic #152~18.04.2-Ubuntu SMP Tue Nov 29 08:23:49 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
当我使用 apt 或 apt-get 时,出现以下错误消息:
输入:
sudo apt install tree
输出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
tree is already the newest version (1.7.0-5).
The following packages were automatically installed and are no longer required:
gir1.2-appindicator3-0.1 gir1.2-spiceclientglib-2.0 gir1.2-spiceclientgtk-3.0 gnome-online-accounts linux-headers-5.4.0-131-generic linux-hwe-5.4-headers-5.4.0-131 linux-image-5.4.0-131-generic
linux-modules-5.4.0-131-generic linux-modules-extra-5.4.0-131-generic python3-macaroonbakery python3-nacl python3-protobuf python3-pymacaroons python3-rfc3339 python3-tz ubuntu-system-service
Use 'sudo apt autoremove' to remove them.
Suggested packages:
multiboot-doc grub-emu xorriso desktop-base
The following packages will be upgraded:
grub-common
1 upgraded, 0 newly installed, 0 to remove and 42 not upgraded.
12 not fully installed or removed.
Need to get 0 B/1,810 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 246727 files and directories currently installed.)
Preparing to unpack .../grub-common_2.02-2ubuntu8.25_amd64.deb ...
/lib/ld-linux-armhf.so.3: No such file or directory
/lib/ld-linux-armhf.so.3: No such file or directory
/lib/ld-linux-armhf.so.3: No such file or directory
invoke-rc.d: initscript grub-common, action "stop" failed.
dpkg: warning: old grub-common package pre-removal script subprocess returned error exit status 1
dpkg: trying script from the new package instead ...
/lib/ld-linux-armhf.so.3: No such file or directory
/lib/ld-linux-armhf.so.3: No such file or directory
/lib/ld-linux-armhf.so.3: No such file or directory
invoke-rc.d: initscript grub-common, action "stop" failed.
dpkg: error processing archive /var/cache/apt/archives/grub-common_2.02-2ubuntu8.25_amd64.deb (--unpack):
new grub-common package pre-removal script subprocess returned error exit status 1
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
/lib/ld-linux-armhf.so.3: No such file or directory
/lib/ld-linux-armhf.so.3: No such file or directory
/lib/ld-linux-armhf.so.3: No such file or directory
/lib/ld-linux-armhf.so.3: No such file or directory
invoke-rc.d: initscript grub-common, action "start" failed.
/lib/ld-linux-armhf.so.3: No such file or directory
dpkg: error while cleaning up:
installed grub-common package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/grub-common_2.02-2ubuntu8.25_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
来源如下:
输入:
> cat /etc/apt/sources.list
输出:
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
还
cat cat /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-bionic.list
输出:
deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main
# deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main
我尝试重新安装 apt 和 dpkg,但没有帮助,
我不明白为什么 x68_64 需要 ld-linux-armhf.so.3