以下是我尝试过的所有方法。我不知道现在还能尝试什么来消除未找到 alsa 的错误。请指导。
$ make
Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'webkit2gtk-4.0' found
Package gtk+-x11-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-x11-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-x11-3.0' found
Package alsa was not found in the pkg-config search path.
Perhaps you should add the directory containing `alsa.pc'
to the PKG_CONFIG_PATH environment variable
No package 'alsa' found
Package freetype2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `freetype2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'freetype2' found
Package webkit2gtk-4.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `webkit2gtk-4.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'webkit2gtk-4.0' found
Package gtk+-x11-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-x11-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-x11-3.0' found
Makefile:174: recipe for target 'check-pkg-config' failed
make: *** [check-pkg-config] Error 1
...
$ sudo apt-get install libasound2
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
libasound2-data : Breaks: libasound2 (< 1.1.3-5ubuntu0.1)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
...
$ sudo apt-get install libasound2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
alsa-utils : Depends: libasound2 (>= 1.1.1)
gnome-settings-daemon : Depends: libasound2 (>= 1.0.16)
google-chrome-stable : Depends: libasound2 (>= 1.0.16)
gstreamer1.0-alsa : Depends: libasound2 (>= 1.0.27)
ibm-java80-jre : Depends: libasound2
libasound2-dev : Depends: libasound2 (= 1.1.3-5)
libasound2-plugins : Depends: libasound2 (>= 1.0.27)
libcanberra0 : Depends: libasound2 (>= 1.0.16)
libpcaudio0 : Depends: libasound2 (>= 1.0.16)
libqt5webenginecore5 : Depends: libasound2 (>= 1.0.16)
libsdl1.2debian : Depends: libasound2 (>= 1.0.16)
libsndio6.1 : Depends: libasound2 (>= 1.0.17)
openjdk-8-jre : Depends: libasound2 (>= 1.0.16)
pulseaudio : Depends: libasound2 (>= 1.0.24.1)
skypeforlinux : Depends: libasound2 (>= 1.0.16)
speech-dispatcher-audio-plugins : Depends: libasound2 (>= 1.0.16)
spice-vdagent : Depends: libasound2 (>= 1.0.16)
vlc-plugin-base : Depends: libasound2 (>= 1.0.27)
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
...
$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
alsa-utils : Depends: libasound2 (>= 1.1.1)
gnome-settings-daemon : Depends: libasound2 (>= 1.0.16)
google-chrome-stable : Depends: libasound2 (>= 1.0.16)
gstreamer1.0-alsa : Depends: libasound2 (>= 1.0.27)
ibm-java80-jre : Depends: libasound2
libasound2-plugins : Depends: libasound2 (>= 1.0.27)
libcanberra0 : Depends: libasound2 (>= 1.0.16)
libpcaudio0 : Depends: libasound2 (>= 1.0.16)
libqt5webenginecore5 : Depends: libasound2 (>= 1.0.16)
libsdl1.2debian : Depends: libasound2 (>= 1.0.16)
libsndio6.1 : Depends: libasound2 (>= 1.0.17)
openjdk-8-jre : Depends: libasound2 (>= 1.0.16)
pulseaudio : Depends: libasound2 (>= 1.0.24.1)
skypeforlinux : Depends: libasound2 (>= 1.0.16)
speech-dispatcher-audio-plugins : Depends: libasound2 (>= 1.0.16)
spice-vdagent : Depends: libasound2 (>= 1.0.16)
vlc-plugin-base : Depends: libasound2 (>= 1.0.27)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
...
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
alsa-utils : Depends: libasound2 (>= 1.1.1)
gnome-settings-daemon : Depends: libasound2 (>= 1.0.16)
google-chrome-stable : Depends: libasound2 (>= 1.0.16)
gstreamer1.0-alsa : Depends: libasound2 (>= 1.0.27)
ibm-java80-jre : Depends: libasound2
libasound2-plugins : Depends: libasound2 (>= 1.0.27)
libcanberra0 : Depends: libasound2 (>= 1.0.16)
libpcaudio0 : Depends: libasound2 (>= 1.0.16)
libqt5webenginecore5 : Depends: libasound2 (>= 1.0.16)
libsdl1.2debian : Depends: libasound2 (>= 1.0.16)
libsndio6.1 : Depends: libasound2 (>= 1.0.17)
openjdk-8-jre : Depends: libasound2 (>= 1.0.16)
pulseaudio : Depends: libasound2 (>= 1.0.24.1)
skypeforlinux : Depends: libasound2 (>= 1.0.16)
speech-dispatcher-audio-plugins : Depends: libasound2 (>= 1.0.16)
spice-vdagent : Depends: libasound2 (>= 1.0.16)
vlc-plugin-base : Depends: libasound2 (>= 1.0.27)
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
答案1
对于大多数用户来说,apt install libasound2-dev
这将解决原来的问题。
正如 apt-get 所抱怨的,你的安装有些损坏:
您在版本 1.1.3-5ubuntu0.1 中安装了软件包 libasound2-data,但是 apt 找不到相同版本的软件包 libasound2。
这可能是从您的 apt 源中删除“bionic-updates”的结果。例如,如果您在 中的“更新”下取消选择“推荐更新”,就会发生这种情况sudo software-properties-gtk
。
假设我处于你的位置,我会做以下事情:确保你的 apt 源定期收到更新:
确保已启用推荐的更新。可以通过
sudo software-properties-gtk
,或通过编辑/etc/apt/sources.list
以包含如下行来启用推荐的更新。deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
sudo apt update
此后,您的软件包应该可以按预期安装。