E: Unable to locate package net-tools

root@0427f4ac397c:/workspace# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/

pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn

Writing to /root/.config/pip/pip.conf

Writing to /root/.config/pip/pip.conf

root@0427f4ac397c:/workspace#

root@0427f4ac397c:/workspace#

root@0427f4ac397c:/workspace# ping www.baidu.com

bash: ping: command not found

root@0427f4ac397c:/workspace# echo "nameserver 8.8.8.8" | tee /etc/resolv.conf >/dev/null

echo "nameserver 114.114.114.114" | tee -a /etc/resolv.conf >/dev/null

root@0427f4ac397c:/workspace#

root@0427f4ac397c:/workspace#

root@0427f4ac397c:/workspace#

root@0427f4ac397c:/workspace# ping www.baidu.com

bash: ping: command not found

root@0427f4ac397c:/workspace# apt install net-tools

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

E: Unable to locate package net-tools

root@0427f4ac397c:/workspace# apt install iputils-ping

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

E: Unable to locate package iputils-ping

root@0427f4ac397c:/workspace# apt-get update

Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]

Get:2 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]

Get:3 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [2844 kB]

Get:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]

Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [127 kB]

Get:6 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]

Get:7 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]

Get:8 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]

Get:9 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]

Get:10 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [47.7 kB]

Get:11 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [4118 kB]

Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1244 kB]

Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [3154 kB]

Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [4272 kB]

Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [55.7 kB]

Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1543 kB]

Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [82.7 kB]

Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [35.2 kB]

Fetched 37.7 MB in 3min 33s (178 kB/s)

Reading package lists... Done

root@0427f4ac397c:/workspace# apt install net-tools

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following NEW packages will be installed:

net-tools

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 204 kB of archives.

After this operation, 819 kB of additional disk space will be used.

Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 net-tools amd64 1.60+git20181103.0eebece-1ubuntu5 [204 kB]

Fetched 204 kB in 8s (26.5 kB/s)

debconf: delaying package configuration, since apt-utils is not installed

Selecting previously unselected package net-tools.

(Reading database ... 16165 files and directories currently installed.)

Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1ubuntu5_amd64.deb ...

Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ...

Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ...

root@0427f4ac397c:/workspace# ping www.baidu.com

bash: ping: command not found

root@0427f4ac397c:/workspace# apt install iputils-ping

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

The following additional packages will be installed:

libcap2-bin libpam-cap

The following NEW packages will be installed:

iputils-ping libcap2-bin libpam-cap

0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.

Need to get 76.7 kB of archives.

After this operation, 280 kB of additional disk space will be used.

Do you want to continue? [Y/n] Y

Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libcap2-bin amd64 1:2.44-1ubuntu0.22.04.2 [26.0 kB]

Get:2 http://archive.ubuntu.com/ubuntu jammy/main amd64 iputils-ping amd64 3:20211215-1 [42.9 kB]

Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libpam-cap amd64 1:2.44-1ubuntu0.22.04.2 [7930 B]

Fetched 76.7 kB in 4s (18.9 kB/s)

debconf: delaying package configuration, since apt-utils is not installed

Selecting previously unselected package libcap2-bin.

(Reading database ... 16214 files and directories currently installed.)

Preparing to unpack .../libcap2-bin_1%3a2.44-1ubuntu0.22.04.2_amd64.deb ...

Unpacking libcap2-bin (1:2.44-1ubuntu0.22.04.2) ...

Selecting previously unselected package iputils-ping.

Preparing to unpack .../iputils-ping_3%3a20211215-1_amd64.deb ...

Unpacking iputils-ping (3:20211215-1) ...

Selecting previously unselected package libpam-cap:amd64.

Preparing to unpack .../libpam-cap_1%3a2.44-1ubuntu0.22.04.2_amd64.deb ...

Unpacking libpam-cap:amd64 (1:2.44-1ubuntu0.22.04.2) ...

Setting up libcap2-bin (1:2.44-1ubuntu0.22.04.2) ...

Setting up libpam-cap:amd64 (1:2.44-1ubuntu0.22.04.2) ...

debconf: unable to initialize frontend: Dialog

debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 78.)

debconf: falling back to frontend: Readline

Setting up iputils-ping (3:20211215-1) ...

root@0427f4ac397c:/workspace# ping www.baidu.com

PING www.a.shifen.com (103.235.46.102) 56(84) bytes of data.

64 bytes from 103.235.46.102 (103.235.46.102): icmp_seq=8 ttl=45 time=175 ms

64 bytes from 103.235.46.102 (103.235.46.102): icmp_seq=9 ttl=45 time=177 ms

^C

--- www.a.shifen.com ping statistics ---

9 packets transmitted, 2 received, 77.7778% packet loss, time 8169ms

rtt min/avg/max/mdev = 175.030/175.943/176.856/0.913 ms

root@0427f4ac397c:/workspace#

相关推荐
CAE虚拟与现实16 天前
Ubuntu中snap
linux·运维·ubuntu·apt·wsl·wsl2·snap
玖石书3 个月前
【apt源】RK3588 平台ubuntu20.04更换apt源
apt·rk3588
morris1314 个月前
【redis】ubuntu18安装redis7
数据库·redis·ubuntu·缓存·apt
188_djh6 个月前
# Ubuntu 达人九步养成记(1)
linux·运维·ubuntu·apt·upgrade·ubuntu下载安装更新·ubuntu设置镜像源
MonkeyKing_sunyuhua8 个月前
ubuntu24.04 snap和apt的区别是什么?
apt·snap
x-cmd8 个月前
[240828] X-CMD 发布 v0.4.8: 新增 ffmpeg 模块;apt 和 brew 模块新增 fz 命令
linux·ubuntu·macos·ffmpeg·apt·brew·包管理
码农飞飞8 个月前
Debian常用包管理命令用法详解
linux·服务器·debian·apt·包管理·dpkg·debuild
wumingxiaoyao9 个月前
Jenkins - apt 安装软件包 404 Not Found
运维·jenkins·apt
skywalk816310 个月前
jail内部ubuntu apt升级失败问题解决
linux·运维·服务器·ubuntu·apt·freebsd