我正在尝试安装台面通用开发在 Ubuntu LTS 上:
sudo apt-get install mesa-common-dev
但是,系统返回:
The following packages have unmet dependencies:
mesa-common-dev : Depends: libgl-dev but it is not going to be installed
Depends: libglx-dev but it is not going to be installed
Depends: libglx-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt-cache 策略 mesa-common-dev
mesa-common-dev:
Installed: (none)
Candidate: 20.0.4-2ubuntu1
Version table:
20.0.4-2ubuntu1 500
500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages
apt-cache 策略 libgl-dev
libgl-dev:
Installed: 1.3.2-1~ubuntu0.20.04.1
Candidate: 1.3.2-1~ubuntu0.20.04.1
Version table:
*** 1.3.2-1~ubuntu0.20.04.1 100
100 /var/lib/dpkg/status
1.3.1-1 500
500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages
apt-cache 策略 libglx-dev
libglx-dev:
Installed: 1.3.2-1~ubuntu0.20.04.1
Candidate: 1.3.2-1~ubuntu0.20.04.1
Version table:
*** 1.3.2-1~ubuntu0.20.04.1 100
100 /var/lib/dpkg/status
1.3.1-1 500
500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages
apt-cache 策略 libdrm-dev
libdrm-dev:
Installed: (nenhum)
Candidate: 2.4.101-2
Version table:
2.4.101-2 500
500 http://br.archive.ubuntu.com/ubuntu focal/main amd64 Packages
太感谢了
grep -Rn --include=*.list ^[^#] /etc/apt/
/etc/apt/sources.list:5:deb http://br.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:15:deb http://br.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:24:deb http://br.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:42:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:44:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:46:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list.d/google-chrome.list:3:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/opera-stable.list:4:deb https://deb.opera.com/opera-stable/ stable non-free #Opera Browser (final releases)
/etc/apt/sources.list.d/sublime-text.list:1:deb https://download.sublimetext.com/ apt/stable/
/etc/apt/sources.list.d/microsoft-edge-beta.list:3:deb [arch=amd64] http://packages.microsoft.com/repos/edge/ stable main
成功!!我加:
德布http://archive.ubuntu.com/ubuntu焦点更新主要受限宇宙多元宇宙
在里面源列表文件。
谢谢你帮助我
答案1
focal-updates
您的 中缺少/etc/apt/sources.list
,要纠正该问题:
echo "deb http://archive.ubuntu.com/ubuntu focal-updates main restricted universe multiverse" |\
sudo tee -a /etc/apt/sources.list
sudo apt update
sudo apt install mesa-common-dev