我是新用户,正在为我的硕士项目使用 NS2,需要指导!我已使用这些命令在 NS2 中安装 gawk
sudo apt-get update
sudo apt-get install gawk
但我在安装 gawk 时遇到一个问题。
ak@ubuntu:~$ sudo apt-get install gawk
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
gawk-doc
The following NEW packages will be installed:
gawk
0 upgraded, 1 newly installed, 0 to remove and 48 not upgraded.
Need to get 418 kB of archives.
After this operation, 1,708 kB of additional disk space will be used.
Err:1 http://us.archive.ubuntu.com/ubuntu focal/main amd64 gawk amd64 1:5.0.1+dfsg-1
Temporary failure resolving 'us.archive.ubuntu.com'
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/g/gawk/gawk_5.0.1+dfsg-1_amd64.deb Temporary failure resolving 'us.archive.ubuntu.com'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
答案1
看起来您遇到了网络/DNS问题,错误表明您的系统无法解析us.archive.ubuntu.com。尝试ping us.archive.ubuntu.com,看看您的系统是否可以解析名称,以及您是否收到响应,例如
ping us.archive.ubuntu.com
PING us.archive.ubuntu.com (91.189.91.38) 56(84) bytes of data.
64 bytes from banjo.canonical.com (91.189.91.38): icmp_seq=1 ttl=53 time=120 ms
如果失败,那么你需要查看你的网络设置