技术小黑屋

Gcc-6 G++-6 无法安装问题解决

在 Ubuntu 20.04 安装gcc-6和g++-6 遇到这样的问题

1
2
3
4
5
6
7
8
9
10
11
sudo apt-get install gcc-6 g++-6 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package gcc-6 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 g++-6 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

解决步骤

  • 打开源配置文件 sudo vim /etc/apt/sources.list
  • 在文件末尾增加 deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe 并保存退出
  • 执行更新 sudo apt update
  • 再次安装sudo apt-get install gcc-6 g++-6 -y 搞定。




快来解锁最新版 Typora,新用户券后仅需 84 元!
如何便宜的购买 office 365 ?
新版赤友 NTFS 助手来袭,正版超低价