我正在尝试libasound2-dev
在 Raspberry Pi 4 上安装新安装的 Ubuntu 20.04,但apt
报告说找不到该软件包。
运行apt search libasound2
收益:
ubuntu@ubuntu:~$ sudo apt search libasound2
Sorting... Done
Full Text Search... Done
alsa-topology-conf/now 1.2.2-1 all [installed,local]
ALSA topology configuration files
libasound2/now 1.2.2-2.1 arm64 [installed,local]
shared library for ALSA applications
libasound2-data/now 1.2.2-2.1 all [installed,local]
Configuration files and profiles for ALSA drivers
ubuntu@ubuntu:~$
然而,查看软件包存储库,它应该适用于 arm64:https://packages.ubuntu.com/focal/libasound2-dev
我的/etc/apt/sources.list
如下(删除注释行之后)。
deb http://ports.ubuntu.com/ubuntu-ports focal main restricted
deb http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted
deb http://ports.ubuntu.com/ubuntu-ports focal universe
deb http://ports.ubuntu.com/ubuntu-ports focal-updates universe
deb http://ports.ubuntu.com/ubuntu-ports focal multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse
deb http://ports.ubuntu.com/ubuntu-ports focal-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports focal-security universe
deb http://ports.ubuntu.com/ubuntu-ports focal-security multiverse
如果有帮助的话,这个问题似乎并不特定于libasound2-dev
。apt 似乎无法在该libdevel
部分中找到任何内容。
答案1
我注意到其中一些文件的/var/lib/apt/lists/
大小为零,因此我运行了:
sudo apt-get clean
sudo apt-get autoclean
sudo rm -rf /var/lib/apt/lists/
sudo apt update
许多零大小文件要大得多,运行后apt search libasound2-dev
产生了预期的结果。