我在windows计算机上安装了带有ubuntu功能的linux环境。之后,我从终端安装了make (成功)。所以我用vs代码编辑器编写了我的第一段代码,但是make无法运行make,因为找不到cc。我检查过它是否安装了,但它没有安装,所以我尝试用'sudo apt install‘来安装它。然而,我总是在过程中发现一个错误,从我的搜索中,似乎找不到这个包。指向包的链接无效。在做了一些调查之后,我发现的几个建议是,在继续之前,我可以等待服务器上线。然而,我想知道还有其他方法可以做到这一点。
终端输入和输出如下:
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环境的一部分。
发布于 2023-05-06 14:17:28
这很简单。您的本地包缓存已过期。在运行sudo apt update之前,需要运行sudo apt install gcc。
https://askubuntu.com/questions/1466838
复制相似问题