1
votes

I have a requirement where i have to make a local repo for installing packages docker.io,jq and nmap instead of from public repo on ubuntu system(Linux ip-172-31-29-180 4.15.0-1065-aws #69-Ubuntu SMP Thu Mar 26 02:17:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux). I have followed following steps

1) installed apache and created directory debs and debs/amd64 in /var/www/html , configuring local repo

2) downloaded deb file from https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64 as my debian verions is buster (files are containerd.io_1.2.6-3_amd64.deb docker-ce-cli_19.03.8~3-0~debian-buster_amd64.deb docker.io_18.09.1+dfsg1-7.1+deb10u1_amd64.deb)

3) making downloaded package known to local repo

  apt-install dpkg-dev -y
   cd /var/www/html/debs
   dpkg-scanpackages amd64 | gzip -9c > amd64/Packages.gz

4) configuring apt to download from localhost repo

echo "deb http://localhost/debs/ amd64/" > /etc/apt/sources.list

5) apt install docker.io gives error

E: Package 'docker.io' has no installation candidate

although when i do a apt list| grep docker.io it gives below o/p

docker.io/now 19.03.6-0ubuntu1~18.04.1 amd64 [residual-config]

Any idea what i am doing wrong so i cannot install docker.io from local repo using deb files

1
I was able to solve the issue after adding [trusted=yes] inside the sources.list file echo "deb [trusted=yes] localhost/debs amd64/" > /etc/apt/sources.listthatguy

1 Answers

0
votes

I was able to solve the issue after adding [trusted=yes] inside the sources.list file echo "deb [trusted=yes] localhost/debs amd64/" > /etc/apt/sources.list