[关闭]
我在 Raspberry pi 3 b+ 上使用 ubuntu server 32bit 20.04。当我尝试安装 mariadb-server 时,输出如下
ubuntu@ubuntu:~$ sudo apt-get install mariadb-server
sudo: unable to resolve host ubuntu: Name or service not known
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mariadb-server : Depends: mariadb-server-10.3 (>= 1:10.3.28+maria~bionic) but it is not installable
E: Unable to correct problems, you have held broken packages.
因此我尝试使用以下方法进行更新,sudo apt-get update
但输出结果如下:
sudo: unable to resolve host ubuntu: Name or service not known
Hit:1 http://sgp1.mirrors.digitalocean.com/mariadb/repo/10.3/ubuntu bionic InRelease
Err:2 http://ports.ubuntu.com/ubuntu-ports focal InRelease
Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Could not connect to ports.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to ports.ubuntu.com:80 (91.189.88.152), connection timed out
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
Err:5 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
Reading package lists... Done
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal/InRelease Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Could not connect to ports.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to ports.ubuntu.com:80 (91.189.88.152), connection timed out
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal-updates/InRelease Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal-backports/InRelease Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/focal-security/InRelease Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable)
W: Some index files failed to download. They have been ignored, or old ones used instead.
就这样。谢谢帮助!