0

I have created a local Ubuntu repository which only mirroring main packages from Ubuntu archives. However, now I am trying to add couple of packages which I have downloaded manually to this repo that they can be available to download but this doesnt seem to work.

Is there anything I am missing?

Packages copied under main in mirror server:

root@ubuntu-mirror:/var/www/html/ubuntu/pool/main/m# ls -l mypkgs/
total 88
-rw-r--r-- 1 root root 14492 Jan  5 11:04 apt-rdepends_1.3.0-9_all.deb
-rw-r--r-- 1 root root 72536 Jan  5 11:04 libapt-pkg-perl_0.1.40build2_amd64.deb
root@ubuntu-mirror:/var/www/html/ubuntu/pool/main/m#

Client:

root@ubuntu-client:/etc/apt# egrep -v "^#|^$" sources.list
deb http://192.168.122.114/ubuntu jammy main
root@ubuntu-client:/etc/apt#

root@ubuntu-client:/etc/apt# apt list apt-rdepends Listing... Done root@ubuntu-client:/etc/apt# apt install apt-rdepends Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package apt-rdepends root@ubuntu-client:/etc/apt#

stumblebee
  • 3,547
sunny_hkhk
  • 19
  • 3
  • If you are mirroring the repositories, you are NOT going to be able to add your own packages to the repository to make it 'just work'. You will need to spin up your own package repository locally to run your own local packages. – Thomas Ward Jan 05 '24 at 01:04
  • Is there a way to do it? – sunny_hkhk Jan 05 '24 at 01:08
  • Run a local repository to host packages yourself? There's multiple ways to do that - see https://askubuntu.com/questions/170348/how-to-create-a-local-apt-repository for some solutions - but note you'll have to run them in a separate document root, etc. alongside your mirror of the Ubuntu repositories, and you'll need to follow the proper network setup etc. to set up the data to properly be read by apt. – Thomas Ward Jan 05 '24 at 01:15
  • I have tried the above option but it still doesnt seem to work, it is keep on looking for InRelease or Release file.

    gn:2 http://192.168.122.114/myrepo InRelease Err:3 http://192.168.122.114/myrepo Release 404 Not Found [IP: 192.168.122.114 80] Reading package lists... Done E: The repository 'http://192.168.122.114/myrepo Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

    – sunny_hkhk Jan 05 '24 at 03:51
  • the only fallback then would be to go for a fully signed and configured local repository with reprepro. It's much more complicated, but is a fully known mechanism for a local repository (and I use it for my local package repos on my network). Debian's wiki is most useful for this - https://wiki.debian.org/DebianRepository/SetupWithReprepro - just make sure that you use "Ubuntu" in place of "Debian", and your Ubuntu release codename instead of Debian codenames. The rest of it for management, etc. is still the same. – Thomas Ward Jan 05 '24 at 13:59

0 Answers0