我想在 Ubuntu 22.04 上安装 gcc-7。
我用了:
sudo apt-get install gcc-7 g++-7
Run Code Online (Sandbox Code Playgroud)
但得到了错误:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package g++-7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
Package gcc-7 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-7' has no installation candidate
E: Package 'g++-7' has no installation can
Run Code Online (Sandbox Code Playgroud)
如何将其安装到我的机器上?
亲切的问候
迪达特
小智 12
感谢@Knud Larsen 提供的解决方案。
我遇到了同样的问题,我需要 distcc 服务器的旧版本。客户端系统、弱工业PC无法更新。
所以解决办法很简单,我没有想到,但它有效。为了记录,我添加了:
deb [arch=amd64] http://archive.ubuntu.com/ubuntu focal main universe
Run Code Online (Sandbox Code Playgroud)
到 /etc/apt/sources.list 和
跑:apt update; apt install g++-7
| 归档时间: |
|
| 查看次数: |
23120 次 |
| 最近记录: |