Ubuntu 16.04 apt-get update non funziona con il repository locale

7

Ho un repository locale di xenial in /CDs/ubuntu directory. Il mio file sources.list:

deb file:/CDs/ubuntu xenial main restricted universe multiverse

Risultati dell'aggiornamento:

#apt-get update
Get:1 file:/CDs/ubuntu xenial InRelease
Ign:1 file:/CDs/ubuntu xenial InRelease
Get:2 file:/CDs/ubuntu xenial Release [246 kB]
Get:2 file:/CDs/ubuntu xenial Release [246 kB]
Get:3 file:/CDs/ubuntu xenial Release.gpg [933 B]
Get:3 file:/CDs/ubuntu xenial Release.gpg [933 B]
Get:4 file:/CDs/ubuntu xenial/main amd64 Packages
Ign:4 file:/CDs/ubuntu xenial/main amd64 Packages
Get:5 file:/CDs/ubuntu xenial/main i386 Packages
Ign:5 file:/CDs/ubuntu xenial/main i386 Packages
Get:6 file:/CDs/ubuntu xenial/main Translation-en
Ign:6 file:/CDs/ubuntu xenial/main Translation-en
Get:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata
Ign:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata
Get:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons
Ign:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons
Get:9 file:/CDs/ubuntu xenial/restricted amd64 Packages
Ign:9 file:/CDs/ubuntu xenial/restricted amd64 Packages
Get:10 file:/CDs/ubuntu xenial/restricted i386 Packages
Ign:10 file:/CDs/ubuntu xenial/restricted i386 Packages
Get:11 file:/CDs/ubuntu xenial/restricted Translation-en
Ign:11 file:/CDs/ubuntu xenial/restricted Translation-en
Get:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata
Ign:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata
Get:13 file:/CDs/ubuntu xenial/universe amd64 Packages
Ign:13 file:/CDs/ubuntu xenial/universe amd64 Packages
Get:14 file:/CDs/ubuntu xenial/universe i386 Packages
Ign:14 file:/CDs/ubuntu xenial/universe i386 Packages
Get:15 file:/CDs/ubuntu xenial/universe Translation-en
Ign:15 file:/CDs/ubuntu xenial/universe Translation-en
Get:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata
Ign:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata
Get:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons
Ign:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons
Get:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages
Ign:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages
Get:19 file:/CDs/ubuntu xenial/multiverse i386 Packages
Ign:19 file:/CDs/ubuntu xenial/multiverse i386 Packages
Get:20 file:/CDs/ubuntu xenial/multiverse Translation-en
Ign:20 file:/CDs/ubuntu xenial/multiverse Translation-en
Get:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata
Ign:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata
Get:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons
Ign:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons
Get:4 file:/CDs/ubuntu xenial/main amd64 Packages [1,201 kB]
Ign:4 file:/CDs/ubuntu xenial/main amd64 Packages
Get:5 file:/CDs/ubuntu xenial/main i386 Packages [1,196 kB]
Ign:5 file:/CDs/ubuntu xenial/main i386 Packages
Get:6 file:/CDs/ubuntu xenial/main Translation-en [568 kB]
Ign:6 file:/CDs/ubuntu xenial/main Translation-en
Get:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata [733 kB]
Ign:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata
Get:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons [409 kB]
Ign:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons
Get:9 file:/CDs/ubuntu xenial/restricted amd64 Packages [8,344 B]
Ign:9 file:/CDs/ubuntu xenial/restricted amd64 Packages
Get:10 file:/CDs/ubuntu xenial/restricted i386 Packages [8,684 B]
Ign:10 file:/CDs/ubuntu xenial/restricted i386 Packages
Get:11 file:/CDs/ubuntu xenial/restricted Translation-en [2,908 B]
Ign:11 file:/CDs/ubuntu xenial/restricted Translation-en
Get:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata [186 B]
Ign:12 file:/CDs/ubuntu xenial/restricted amd64 DEP-11 Metadata
Get:13 file:/CDs/ubuntu xenial/universe amd64 Packages [7,532 kB]
Ign:13 file:/CDs/ubuntu xenial/universe amd64 Packages
Get:14 file:/CDs/ubuntu xenial/universe i386 Packages [7,512 kB]
Ign:14 file:/CDs/ubuntu xenial/universe i386 Packages
Get:15 file:/CDs/ubuntu xenial/universe Translation-en [4,354 kB]
Ign:15 file:/CDs/ubuntu xenial/universe Translation-en
Get:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata [3,410 kB]
Ign:16 file:/CDs/ubuntu xenial/universe amd64 DEP-11 Metadata
Get:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons [7,448 kB]
Ign:17 file:/CDs/ubuntu xenial/universe DEP-11 64x64 Icons
Get:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages [144 kB]
Ign:18 file:/CDs/ubuntu xenial/multiverse amd64 Packages
Get:19 file:/CDs/ubuntu xenial/multiverse i386 Packages [140 kB]
Ign:19 file:/CDs/ubuntu xenial/multiverse i386 Packages
Get:20 file:/CDs/ubuntu xenial/multiverse Translation-en [106 kB]
Ign:20 file:/CDs/ubuntu xenial/multiverse Translation-en
Get:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata [63.8 kB]
Ign:21 file:/CDs/ubuntu xenial/multiverse amd64 DEP-11 Metadata
Get:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons [230 kB]
Ign:22 file:/CDs/ubuntu xenial/multiverse DEP-11 64x64 Icons
Get:4 file:/CDs/ubuntu xenial/main amd64 Packages [1,558 kB]
Get:5 file:/CDs/ubuntu xenial/main i386 Packages [1,552 kB]
Get:6 file:/CDs/ubuntu xenial/main Translation-en [799 kB]
Ign:6 file:/CDs/ubuntu xenial/main Translation-en
Get:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata [2,189 kB]
Err:7 file:/CDs/ubuntu xenial/main amd64 DEP-11 Metadata
  File not found - /CDs/ubuntu/dists/xenial/main/dep11/Components-amd64.yml (2: No such file or directory)
Get:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons [481 kB]
Err:8 file:/CDs/ubuntu xenial/main DEP-11 64x64 Icons
  File not found - /CDs/ubuntu/dists/xenial/main/dep11/icons-64x64.tar (2: No such file or directory)
Reading package lists... Done                 
E: Failed to fetch file:/CDs/ubuntu/dists/xenial/main/dep11/Components-amd64.yml  File not found - /CDs/ubuntu/dists/xenial/main/dep11/Components-amd64.yml (2: No such file or directory)
E: Failed to fetch file:/CDs/ubuntu/dists/xenial/main/dep11/icons-64x64.tar  File not found - /CDs/ubuntu/dists/xenial/main/dep11/icons-64x64.tar (2: No such file or directory)
E: Some index files failed to download. They have been ignored, or old ones used instead.

In /var/lib/apt/lists , non ho nulla. Solo informazioni parziali in partial directory:

#/var/lib/apt/lists/partial# ls -l
total 7308
-rw-r--r-- 1 root root 7228243 Apr 22 09:37 _CDs_ubuntu_dists_xenial_main_binary-amd64_Packages
lrwxrwxrwx 1 root root      54 May 13 10:25 _CDs_ubuntu_dists_xenial_main_binary-amd64_Packages.gz -> /CDs/ubuntu/dists/xenial/main/binary-amd64/Packages.gz
lrwxrwxrwx 1 root root      53 May 13 10:25 _CDs_ubuntu_dists_xenial_main_binary-i386_Packages.gz -> /CDs/ubuntu/dists/xenial/main/binary-i386/Packages.gz
-rw-r--r-- 1 root root  245864 Apr 22 11:24 _CDs_ubuntu_dists_xenial_Release
-rw-r--r-- 1 root root     933 Apr 22 11:24 _CDs_ubuntu_dists_xenial_Release.gpg

Il problema può essere risolto solo eseguendo il downgrade ad apt 1.1 da trusty .

Inoltre il nuovo apt-get update prova a modificare i diritti dei file che memorizza come link simbolici in /var/lib/apt/list . Ad esempio, modifica i diritti di accesso del file:

/CDs/ubuntu/dists/xenial/main/binary-amd64/Packages.gz

Qualche suggerimento su come usare apt 1.2 in Ubuntu 16.04 con repo locale?

    
posta Arcady 13.05.2016 - 01:12

3 risposte

5

per l'uso con apt 1.2 in Ubuntu 16.04 con repository locale è necessario rimuovere questo file:

  

/etc/apt/apt.conf.d/50appstream

utilizza:

  

sudo rm /etc/apt/apt.conf.d/50appstream

    
risposta data Henry Sosa 28.06.2016 - 19:43
1

Per me, solo cancellazione

/etc/apt/apt.conf.d/50appstream

non ha funzionato, perché avevo scaricato solo i pacchetti amd64 . Per farlo funzionare, ho aggiunto l'architettura alle righe sources.list

deb [arch=amd64] file:/wherever xenial main restricted universe multiverse
...etc.

Dopo aver fatto questo apt-get update ha funzionato bene.

    
risposta data wakjah 20.12.2017 - 15:04
0

Ho avuto lo stesso problema, ho provato a risolvere questo problema

sudo rm /etc/apt/apt.conf.d/50appstream

Ma non ha funzionato per me. Ho letto un possibile errore su di esso qui

In ogni caso trovo un'alternativa e funziona molto bene per me

Apro la directory in cui ho il mio repository ed eseguo il seguente comando:

python -m SimpleHTTPServer <port>

è un modo semplice per avviare un server web in qualsiasi cartella che puoi vedere in Come avviare facilmente un server web in qualsiasi cartella?

Quindi ora puoi usare il tuo sources.list come quando usi il repository tramite http. Per esempio nel mio caso io uso il por 8585 e questo è il mio sources.list

deb http://localhost:8585/ xenial main multiverse restricted universe

deb http://localhost:8585/ xenial-backports main multiverse restricted universe

deb http://localhost:8585/ xenial-proposed main multiverse restricted universe

deb http://localhost:8585/ xenial-security main multiverse restricted universe

deb http://localhost:8585/ xenial-updates main multiverse restricted universe

È una soluzione rapida, sono abbastanza sicuro che ci siano altre soluzioni in questo modo più forti.

    
risposta data Cyberguille 31.05.2017 - 23:50

Leggi altre domande sui tag