docker-install icon indicating copy to clipboard operation
docker-install copied to clipboard

Is apt-transport-https a requirement on raspbian?

Open linzack opened this issue 3 years ago • 1 comments

Hi, on raspbian the install script will cause error

$ curl -fsSL https://test.docker.com -o test-docker.sh
$ sudo sh ./test-docker.sh
# Executing docker install script, commit: 26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
E: Essential packages were removed and -y was used without --allow-remove-essential.

it's because apt-transport-https will try to remove apt

$ sudo apt-get install apt-transport-https
The following packages will be REMOVED:
  apt apt-listchanges apt-show-versions apt-utils tasksel tasksel-data unattended-upgrades
The following NEW packages will be installed:
  apt-transport-https
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt
0 upgraded, 1 newly installed, 7 to remove and 693 not upgraded.
Need to get 166 kB of archives.
After this operation, 6,152 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!'
 ?]

but if I modify test-docker.sh from

pre_reqs="apt-transport-https ca-certificates curl"

to

pre_reqs="ca-certificates curl"

I can still install docker without error. Thank you!

linzack avatar Apr 10 '21 14:04 linzack

It is only required until Stretch, form Buster on, HTTPS is integrated into the apt package. But apt-transport-https is a transitional dummy package which pulls in apt as dependency, so it shouldn't hurt to install, just has not any beneficial effect. That it tries to purge apt in your case means that you have conflicting 3rd party APT repositories added on your system. Check /etc/apt/sources.list and all .list files in /etc/apt/sources.list.d/ for anything that is not Raspbian, archive.raspberrypi.org or Docker related.

MichaIng avatar Sep 23 '21 21:09 MichaIng