On my Ubuntu server 16.04 I have following entries in /etc/apt/sources.list
deb [arch=amd64 trusted=yes] file:/home/discoprodigy /debbin main
For good measure, I have also tried restricted, universe and multiverse.
There are no other entries in this file. And /etc/apt/sources.list.d is empty.
In /home/discoprodigy/debbin
152 miscellaneous .deb files
Packages.gz
Packages (plain text file)
Just for fun, I also have in /home/discoprodigy/debbin/main/binary-amd64
Packages.gz
Packages (plain text file)
Then I execute:
sudo apt-get update
And this is the result
Get:1 file:/home/discoprodigy /debbin InRelease
Ign:1 file:/home/discoprodigy /debbin InRelease
Get:2 file:/home/discoprodigy /debbin Release
Ign:2 file:/home/discoprodigy /debbin Release
Get:3 file:/home/discoprodigy /debbin/main amd64 Packages
Ign:3 file:/home/discoprodigy /debbin/main amd64 Packages
Get:4 file:/home/discoprodigy /debbin/main all Packages
Ign:4 file:/home/discoprodigy /debbin/main all Packages
|
etc. etc.
|
Get:3 file:/home/discoprodigy /debbin/main amd64 Packages
Err:3 file:/home/discoprodigy /debbin/main amd64 Packages
File not found - /home/discoprodigy/dists//debbin/main/binary-amd64/Packages (2: No such file or directory)
Get:4 file:/home/discoprodigy /debbin/main all Packages
Ign:4 file:/home/discoprodigy /debbin/main all Packages
Reading package lists... Done
N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Failed to fetch file:/home/discoprodigy/dists//debbin/main/binary-amd64/Packages File not found - /home/discoprodigy/dists//debbin/main/binary-amd64/Packages (2: No such file or directory)
E: Some index files failed to download. They have been ignored, or old ones used instead.
I have also tried what is suggested here Ubuntu 16.04 apt-get update doesn't work with local repository but to no avail.
Update: Following user.dz's suggestion, apt-get update is "successful", but now when I try apt-get install openssh-server I get:
Err:1 file:/home/discoprodigy debbin/ ncurses-term 6.0+20160213-1ubuntu1 File not found - /home/discoprodigy/debbin/ncurses-term_6.0+20160213-1ubuntu1_all.deb (2: No such file or directory)
But the file is there.
$ ls -l /home/discoprodigy/debbin/ncurses-term_6.0+20160213-1ubuntu1_all.deb
-rw-rw-r-- 1 discoprodigy discoprodigy 249166 Nov 24 15:08 /home/discoprodigy/debbin/ncurses-term_6.0+20160213-1ubuntu1_all.deb
Update: I cleared the files status and available in /var/lib/dpkg and ran apt-get update and then apt-get install openssh-server
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openssh-server : Depends: libaudit1 (>= 1:2.2.1) but it is not installable
Depends: libc6 (>= 2.17) but it is not going to be installed
|
etc. etc.
|
Recommends: ncurses-term but it is not going to be installed
Recommends: ssh-import-id but it is not going to be installed
N: Ignoring file '20auto-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Unable to correct problems, you have held broken packages.
dpkg --get-selections | grep hold did however not report any held packages.
Update: As per user.dz's request:
stat -c "%A %G %U %n" /home/ /home/discoprodigy/ /home/discoprodigy/debbin/
drwxrwxr-x discoprodigy discoprodigy /home/
drwxrwxr-x discoprodigy discoprodigy /home/discoprodigy/
drwxrwxr-x discoprodigy discoprodigy /home/discoprodigy/debbin/