Ubuntu 16.04 apt-get update falha com repositório local

3

No meu servidor Ubuntu 16.04 eu tenho as seguintes entradas em /etc/apt/sources.list

deb [arch=amd64 trusted=yes] file:/home/discoprodigy /debbin main  

Por uma boa medida, eu também tentei restringir, universo e multiverso. Não há outras entradas neste arquivo. E /etc/apt/sources.list.d está vazio.

Em /home/discoprodigy/debbin

152 miscellaneous .deb files
Packages.gz
Packages (plain text file)

Apenas por diversão, eu também tenho em /home/discoprodigy/debbin/main/binary-amd64

Packages.gz
Packages (plain text file)

Então eu executo:

sudo apt-get update

E este é o resultado

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.

Eu também tentei o que é sugerido aqui Ubuntu 16.04 apt-get update não t trabalhar com o repositório local , mas sem sucesso.

Atualização: Seguindo a sugestão do user.dz, o apt-get update é "bem-sucedido", mas agora, quando tento apt-get install openssh-server , obtenho:

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) 

Mas o arquivo está lá.

$ 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

Atualização: limpei os arquivos status e available em /var/lib/dpkg e executei apt-get update e, em seguida, 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.
No entanto,

dpkg --get-selections | grep hold não relatou nenhum pacote retido.

Atualização: de acordo com o pedido do user.dz:

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/
    
por G.Flemming 25.11.2016 / 22:02

1 resposta

2
  • Se bem me lembro, quando configuro meu repositório local trivial. Eu usei este formulário

    ##LOCAL
    deb file:///path-to-parent-of-packages-folder packages-folder/
    
    ##LAN using HTTP server
    deb http://ip-address packages-folder/
    
    ##LAN using HTTP server & mDNS (Avahi)
    deb http://machine-name.local packages-folder/
    
  • Por isso, sua configuração deve ser com esta linha:

    deb [arch=amd64 trusted=yes] file:///home/discoprodigy debbin/
    

    ou

    deb [arch=amd64 trusted=yes] file:///home/discoprodigy/debbin ./
    

Referência: Wiki Debian: Como configurar um arquivo trivial

    
por user.dz 26.11.2016 / 00:19