在linux环境下安装cc还有其他方法吗?

问题描述 投票:0回答:0

我在我的windows电脑上安装了具有ubuntu功能的linux环境。之后,我从终端安装了 make(成功)。所以我在 vs 代码编辑器中编写了我的第一个代码,但是由于找不到 cc 而无法运行 make。我检查它是否已安装,但没有安装,所以我尝试使用“sudo apt install gcc”安装它。但是,我总是在过程中遇到错误,从我的搜索中似乎找不到包。包的链接无效。在进行一些挖掘之后,我发现的一些建议是,我可以等待服务器联机,然后再继续。但是,我想知道是否还有另一种方法可以做到这一点。

终端输入输出如下图:

dillon@OPTIMUS:~$ sudo apt install gcc
[sudo] password for dillon:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  cpp cpp-11 fontconfig-config fonts-dejavu-core gcc-11 gcc-11-base libasan6 libatomic1 libc-dev-bin libc-devtools
  libc6-dev libcc1-0 libcrypt-dev libdeflate0 libfontconfig1 libfreetype6 libgcc-11-dev libgd3 libgomp1 libisl23
  libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libtiff5 libtirpc-dev libtsan0
  libubsan1 libwebp7 libxpm4 linux-libc-dev manpages-dev rpcsvc-proto
Suggested packages:
  cpp-doc gcc-11-locales gcc-multilib autoconf automake libtool flex bison gdb gcc-doc gcc-11-multilib gcc-11-doc
  glibc-doc libgd-tools
The following NEW packages will be installed:
  cpp cpp-11 fontconfig-config fonts-dejavu-core gcc gcc-11 gcc-11-base libasan6 libatomic1 libc-dev-bin libc-devtools
  libc6-dev libcc1-0 libcrypt-dev libdeflate0 libfontconfig1 libfreetype6 libgcc-11-dev libgd3 libgomp1 libisl23
  libitm1 libjbig0 libjpeg-turbo8 libjpeg8 liblsan0 libmpc3 libnsl-dev libquadmath0 libtiff5 libtirpc-dev libtsan0
  libubsan1 libwebp7 libxpm4 linux-libc-dev manpages-dev rpcsvc-proto
0 upgraded, 38 newly installed, 0 to remove and 0 not upgraded.
Need to get 1339 kB/49.0 MB of archives.
After this operation, 153 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-libc-dev amd64 5.15.0-70.77
  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_5.15.0-70.77_amd64.deb  404  Not Found [IP: 185.125.190.36 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我尝试使用错误消息末尾提供的修复程序,但这并没有解决问题。我也在想我可以上网并手动下载软件包,但我对此并不了解,也不知道我应该选择什么特定的软件包。我也不确定如何安装它以便它成为 linux 环境的一部分。

linux ubuntu makefile cc
© www.soinside.com 2019 - 2024. All rights reserved.