当我在 ubuntu 终端中编写代码:-“sudo apt install g++”来安装 g++ 编译器时,它显示了这个错误

当我在 ubuntu 终端中编写代码:-“sudo apt install g++”来安装 g++ 编译器时,它显示了这个错误
sudo apt install g++
[sudo] password for kpsd4050: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  g++-7 libstdc++-7-dev
Suggested packages:
  g++-multilib g++-7-multilib gcc-7-doc libstdc++6-7-dbg libstdc++-7-doc
The following NEW packages will be installed:
  g++ g++-7 libstdc++-7-dev
0 upgraded, 3 newly installed, 0 to remove and 450 not upgraded.
Need to get 9,035 kB of archives.
After this operation, 40.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libstdc++-7-dev amd64 7.3.0-27ubuntu1~18.04
  404  Not Found [IP: 91.189.88.149 80]
Err:2 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++-7 amd64 7.3.0-27ubuntu1~18.04
  404  Not Found [IP: 91.189.88.149 80]
Err:3 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 g++ amd64 4:7.3.0-3ubuntu2.1
  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/libstdc++-7-dev_7.3.0-27ubuntu1~18.04_amd64.deb  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/g/gcc-7/g++-7_7.3.0-27ubuntu1~18.04_amd64.deb  404  Not Found [IP: 91.189.88.149 80]
E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/g/gcc-defaults/g++_7.3.0-3ubuntu2.1_amd64.deb  404  Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

答案1

尝试sudo apt-get update 然后sudo apt install g++

相关内容