[SOLVED] Trying to make local APT repo

New to Debian (Or Linux in general)? Ask your questions here!

[SOLVED] Trying to make local APT repo

Postby MultiplexLayout » 2021-02-05 21:38

I'm trying to follow these https://www.debian.org/doc/manuals/apt-howto/ch-basico.en.html#s-dpkg-scanpackages instructions on setting up a local folder of .deb files. The .deb file I'm trying to install is PureRef. I downloaded a .deb from their site and put them in a folder in my home directory called custom-deb. running "dpkg-scanpackeages *PATHTOMYHOME*/custom-deb /dev/null | gzip > *PATHTOMYHOME*/custom-deb/Packages.gz" gives me:
Code: Select all
dpkg-scanpackages: warning: Packages in archive but missing from override file:
dpkg-scanpackages: warning:   PureRef
dpkg-scanpackages: info: Wrote 1 entries to output Packages file.

Here is the line I have added to /etc/apt/sources.list:
Code: Select all
deb file:*PATHTOMYHOME*/ custom-deb/

However, running "sudo aptitude update" gives me:
Code: Select all
Get: 1 file:*PATHTOMYHOME* custom-deb/ InRelease
Ign file:*PATHTOMYHOME* custom-deb/ InRelease
Get: 2 file:*PATHTOMYHOME* custom-deb/ Release
Err file:*PATHTOMYHOME* custom-deb/ Release
  File not found -*PATHTOMYHOME*/custom-deb/Release (2: No such file or directory)
Hit http://deb.debian.org/debian buster InRelease
Hit http://deb.debian.org/debian buster-backports InRelease                     
Hit http://security.debian.org/debian-security buster/updates InRelease
Hit http://deb.debian.org/debian buster-updates InRelease                       
Hit https://dl.winehq.org/wine-builds/debian buster InRelease               
Hit http://ftp.uk.debian.org/debian testing InRelease
E: The repository 'file:*PATHTOMYHOME* custom-deb/ Release' does not have a Release file.
E: Failed to download some files
W: Failed to fetch file:*PATHTOMYHOME*/custom-deb/Release: File not found - *PATHTOMYHOME*/custom-deb/Release (2: No such file or directory)
E: Some index files failed to download. They have been ignored, or old ones used instead.

I don't know what I'm doing wrong?
Last edited by MultiplexLayout on 2021-02-05 23:18, edited 1 time in total.
MultiplexLayout
 
Posts: 9
Joined: 2020-09-23 19:21

Re: Trying to make local APT repo

Postby CwF » 2021-02-05 21:55

MultiplexLayout wrote: /etc/apt/sources.list:
Code: Select all
deb [trusted=yes] file:///"*PATHTOMYHOME*/custom-deb/" ./
CwF
 
Posts: 926
Joined: 2018-06-20 15:16

Re: Trying to make local APT repo

Postby MultiplexLayout » 2021-02-05 22:18

CwF wrote:
MultiplexLayout wrote: /etc/apt/sources.list:
Code: Select all
deb [trusted=yes] file:///"*PATHTOMYHOME*/custom-deb/" ./

Thank you for replying. I think my attempt to be anonymous (PATHTOHOME) made things ambiguous. Here is what my sources looks like:
Code: Select all
deb [trusted=yes] file:///"/home/myusername/custom-deb/" ./

This seems to update alright but when I try to install pureref i get:
Code: Select all
The following NEW packages will be installed:
  pureref
The following packages will be REMOVED:
  linux-headers-4.19.0-12-amd64{u} linux-headers-4.19.0-12-common{u}
0 packages upgraded, 1 newly installed, 2 to remove and 0 not upgraded.
Need to get 0 B/17.3 MB of archives. After unpacking 38.4 MB will be freed.
Do you want to continue? [Y/n/?] y
Get: 1 file://home/myusername/custom-deb ./ pureref 1.11.1 [17.3 MB]
Err file://home/myusername/custom-deb ./ pureref 1.11.1
  File not found - //home/myusername/custom-deb/custom-deb/PureRef-1.11.1_x64.deb (2: No such file or directory)
0% [Working]E: Failed to fetch file:////home/myusername/custom-deb/custom-deb/PureRef-1.11.1_x64.deb: File not found - //home/myusername/custom-deb/custom-deb/PureRef-1.11.1_x64.deb (2: No such file or directory)
E: Unable to fetch some packages; try '-o APT::Get::Fix-Missing=true' to continue with missing packages


(my last upgrade installed new nvidia drivers and linux header, which is why it's removing those two, I think)
I don't know why it's doubling up custom-deb?
MultiplexLayout
 
Posts: 9
Joined: 2020-09-23 19:21

Re: Trying to make local APT repo

Postby CwF » 2021-02-05 22:41

Don't know, clean it up. I usually use a path outside home and use a root terminal to make the packages file for a larger directory of debs previously known to work - like an upgrade group for an offline computer.

For one deb, gdebi would be more useful, and help you with the random debs dependencies you may find.

I fudged it with your crazy path, packages.gz resides in /home/myusername/custom-deb/
Code: Select all
deb [trusted=yes] file:///home/myusername/custom-deb/ ./
CwF
 
Posts: 926
Joined: 2018-06-20 15:16

Re: Trying to make local APT repo

Postby MultiplexLayout » 2021-02-05 23:18

CwF wrote:Don't know, clean it up. I usually use a path outside home and use a root terminal to make the packages file for a larger directory of debs previously known to work - like an upgrade group for an offline computer.

For one deb, gdebi would be more useful, and help you with the random debs dependencies you may find.

I fudged it with your crazy path, packages.gz resides in /home/myusername/custom-deb/
Code: Select all
deb [trusted=yes] file:///home/myusername/custom-deb/ ./

This works. Thank you for the help and gdebi suggestion.
MultiplexLayout
 
Posts: 9
Joined: 2020-09-23 19:21

Re: [SOLVED] Trying to make local APT repo

Postby stevepusser » 2021-02-06 02:25

Jeesh, just install and use local-apt-repository if you want a local apt repo, though it's not needed for single deb packages. I use it to test backports of interdependent amd64 and i386 packages, such as the Nvidia driver on a multiarch amd64 system.

Code: Select all
Description: Ready to use local apt repository
 With this package installed, every Debian package (i.e. a *.deb file) dropped
 into /srv/local-apt-repository (which you need to create first) will be
 available to apt.
 .
 This package does not provide an apt repository to be used by other hosts. For
 that, look at more serious repository solutions like reprepro and
 apt-ftparchive.
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12233
Joined: 2009-10-06 05:53


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 14 guests

fashionable