Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Trying to make local APT repo

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

[SOLVED] Trying to make local APT repo

#1 Post by MultiplexLayout »

I'm trying to follow these https://www.debian.org/doc/manuals/apt- ... anpackages 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.

CwF
Global Moderator
Global Moderator
Posts: 2679
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Trying to make local APT repo

#2 Post by CwF »

MultiplexLayout wrote: /etc/apt/sources.list:

Code: Select all

deb [trusted=yes] file:///"*PATHTOMYHOME*/custom-deb/" ./

MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

Re: Trying to make local APT repo

#3 Post by MultiplexLayout »

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?

CwF
Global Moderator
Global Moderator
Posts: 2679
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Trying to make local APT repo

#4 Post by CwF »

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/ ./

MultiplexLayout
Posts: 56
Joined: 2020-09-23 19:21
Has thanked: 7 times

Re: Trying to make local APT repo

#5 Post by MultiplexLayout »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [SOLVED] Trying to make local APT repo

#6 Post by stevepusser »

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

Post Reply