红煌流星

入驻于 2020-04-22 / MAKE 主页

红煌流星 创作的主题

树莓派4安装docker 失败

树莓派 红煌流星 2020-04-27最后回复来自 mrliu
5


红煌流星 发表的回复
回复了 红煌流星 创建的主题 树莓派 / 树莓派4安装docker 失败
2020-04-22

curl ca-certificates 这两个包都没问题,apt-transport-https有问题
chinhung@raspberrypi:~ $ sudo apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
python-apt-common python3-apt python3-debconf
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libapt-pkg4.12
The following packages will be REMOVED:
apt apt-listchanges apt-utils tasksel tasksel-data
The following NEW packages will be installed:
apt-transport-https libapt-pkg4.12
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt
0 upgraded, 2 newly installed, 5 to remove and 0 not upgraded.
Need to get 847 kB of archives.
After this operation, 3,112 kB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
?]

回复了 红煌流星 创建的主题 树莓派 / 树莓派4安装docker 失败
2020-04-22

这是 sh 的源代码
# Run setup for each distro accordingly
case "$lsb_dist" in
ubuntu|debian|raspbian)
pre_reqs="apt-transport-https ca-certificates curl"
if [ "$lsb_dist" = "debian" ]; then
# libseccomp2 does not exist for debian jessie main repos for aarch64
if [ "$(uname -m)" = "aarch64" ] && [ "$dist_version" = "jessie" ]; then
add_debian_backport_repo "$dist_version"
fi
fi

if ! command -v gpg > /dev/null; then
pre_reqs="$pre_reqs gnupg"
fi
apt_repo="deb [arch=$(dpkg --print-architecture)] $DOWNLOAD_URL/linux/$lsb_dist $dist_version $CHANNEL"
(
if ! is_dry_run; then
set -x
fi
$sh_c 'apt-get update -qq >/dev/null'
$sh_c "DEBIAN_FRONTEND=noninteractive apt-get -y install -qq $pre_reqs >/dev/null"
$sh_c "curl -fsSL \"$DOWNLOAD_URL/linux/$lsb_dist/gpg\" | apt-key add -qq - >/dev/null"
$sh_c "echo \"$apt_repo\" > /etc/apt/sources.list.d/docker.list"
$sh_c 'apt-get update -qq >/dev/null'
)
pkg_version=""
---------------
独立运行这两句都报同样的错:
chinhung@raspberrypi:~ $ sudo apt-get -y install -qq apt-transport-https ca-certificates curl
E: Essential packages were removed and -y was used without --allow-remove-essential.
chinhung@raspberrypi:~ $ sudo apt-get install -qq apt-transport-https ca-certificates curl
E: Essential packages were removed and -y was used without --allow-remove-essential.