Apt-get 更新因文件丢失或损坏而出现问题

Apt-get 更新因文件丢失或损坏而出现问题

我正在为非洲的人道主义任务做准备,我们会把两台笔记本电脑留在互联网连接成本低的地方。我宁愿运行 Ubuntu,而不是“另一个更不靠谱的选择”。

因此,为了更新以及设置适应性(即使用应用程序库),我想创建一个Xenial 仓库的本地镜像放在 USB SSD 硬盘上,以便他们可以物理地连接到更连通/更便宜的插座。我一直在使用apt-镜像根据这个指示教程到目前为止(注意,法语在前,但我想这已经足够标准了)。

我正在运行以下所有内容Ubuntu 16.10系统。

我的消息来源如下:

deb [arch=amd64] file:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/ xenial multiverse universe main 
deb [arch=amd64] file:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/ xenial-updates multiverse universe main
deb [arch=amd64] file:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/ xenial-security multiverse universe main
deb [arch=amd64] file:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/ xenial partner

我在执行“时遇到错误sudo apt-get 更新“基于未发现的组件-amd64.yml文件,而有一个组件-amd64.yml.gz目标存储库中属于 root 的具有混乱权限(-rw-----)的文件。

** (appstreamcli:17139): WARNING **: No origin found for file _home_andre_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-security_restricted_dep11_Components-amd64.yml.gz

(appstreamcli:17139): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:17139): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:17139): WARNING **: No origin found for file _home_andre_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-security_multiverse_dep11_Components-amd64.yml.gz

(appstreamcli:17139): GLib-GIO-CRITICAL **: g_converter_input_stream_new: assertion 'G_IS_INPUT_STREAM (base_stream)' failed

(appstreamcli:17139): GLib-GIO-CRITICAL **: g_output_stream_splice: assertion 'G_IS_INPUT_STREAM (source)' failed

** (appstreamcli:17139): WARNING **: No origin found for file _home_andre_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-security_universe_dep11_Components-amd64.yml.gz
AppStream cache update completed, but some metadata was ignored due to errors.
Lecture des listes de paquets... Fait
N: Can't drop privileges for downloading as file '/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission non accordée)
E: Failed to fetch file:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/universe/dep11/Components-amd64.yml  Fichier non trouvé - /media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/universe/dep11/Components-amd64.yml (2: Aucun fichier ou dossier de ce type)
E: Failed to fetch file:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/universe/dep11/Components-amd64.yml  Fichier non trouvé - /media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/universe/dep11/Components-amd64.yml (2: Aucun fichier ou dossier de ce type)
E: Failed to fetch file:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/universe/dep11/Components-amd64.yml  Fichier non trouvé - /media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/universe/dep11/Components-amd64.yml (2: Aucun fichier ou dossier de ce type)
E: Le téléchargement de quelques fichiers d'index a échoué, ils ont été ignorés, ou les anciens ont été utilisés à la place.

我发现了一些与权利和特权有关的报告。我还遇到了另一份与dep11文件并决定根据评论采取行动

我的conf apt-miror文件因此变成:

############# config ##################
#
set base_path    /media/andre/Depots/miroir 
#
set mirror_path  $base_path/mirror
set skel_path    $base_path/skel
set var_path     $base_path/var
set cleanscript $var_path/clean.sh
set defaultarch  deb-amd64
set postmirror_script $var_path/postmirror.sh
set run_postmirror 0
set nthreads     20
set _tilde 0
#
############# end config ##############
#
deb-amd64 http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
deb-amd64 http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
#
## Major bug fix updates produced after the final release of the distribution.
#
deb-amd64 http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
#
## Dépôt commercial  ##
#
deb-amd64 http://archive.canonical.com/ubuntu xenial partner
#
############# clean ##############
#
clean http://fr.archive.ubuntu.com/ubuntu/ xenial
clean http://security.ubuntu.com/ubuntu xenial-security
clean http://archive.canonical.com/ubuntu xenial
clean http://extras.ubuntu.com/ubuntu xenial

但现在,情况也一样翻译-en文件!

我决定重置整个混乱并重新下载仓库。

启动时apt-get 更新,有一个毫无根据的“包裹“文件以及一些”组件-amd64.yml" 文件。

drwxr-xr-x 6 root root 4096 aog 19 16:31 xenial
drwxr-xr-x 6 root root 4096 aog 19 16:31 xenial-updates
__________________________________________________________________________________________
E: Failed to fetch file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/dep11/Components-amd64.yml  Fichier non trouvé - /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/dep11/Components-amd64.yml (2: Aucun fichier ou dossier de ce type)
___________________________________________________________________________________________
administrateur@femmeTantsaha1:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/dep11$ ls -l
total 2116
-rw-r--r-- 1 root root  732506 apr 21 13:08 Components-amd64.yml.gz
-rw-r--r-- 1 root root 1023905 apr 21 13:09 icons-128x128.tar.gz
-rw-r--r-- 1 root root  409405 apr 21 13:09 icons-64x64.tar.gz
___________________________________________________________________________________________
E: Failed to fetch file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11/Components-amd64.yml  Fichier non trouvé - /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11/Components-amd64.yml (2: Aucun fichier ou dossier de ce type)
____________________________________________________________________________________________
administrateur@femmeTantsaha1:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11$ ls -l
total 748
-rw-r--r-- 1 root root 213372 aog 18 20:17 Components-amd64.yml.gz
-rw-r--r-- 1 root root 388198 aog 18 20:18 icons-128x128.tar.gz
-rw-r--r-- 1 root root 159218 aog 18 20:18 icons-64x64.tar.gz
_____________________________________________________________________________________________
E: Le téléchargement de quelques fichiers d'index a échoué, ils ont été ignorés, ou les anciens ont été utilisés à la place.

我尝试通过使用文件“/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/main/binary-amd64/Packages“。我下载并解压了”软件包.xz“ 在//security.ubuntu.com/ubuntu/dists…ary-amd64/并恢复丢失的存储库链接。

andre@andre-dotmu:/media/andre/Depots/miroir/mirror/security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-amd64$ ls -l
total 1128
-rw-r--r-- 1 root root 846812 août  24 08:42 Packages
-rw-r--r-- 1 root root 165174 août  24 07:58 Packages.gz
-rw-r--r-- 1 root root 133896 août  24 07:58 Packages.xz
-rw-r--r-- 1 root root    105 août  24 07:58 Release

为了 ”组件-amd64.yml“文件,我解压了”组件-amd64.yml.gz“在指定的存储库中找到的文件。

andre@andre-dotmu:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/dep11$ ls -l
total 4256
-rw------- 1 _apt root 2188952 avril 21 12:08 Components-amd64.yml
-rw-r--r-- 1 root root  732506 avril 21 12:08 Components-amd64.yml.gz
-rw-r--r-- 1 root root 1023905 avril 21 12:09 icons-128x128.tar.gz
-rw------- 1 _apt root  409405 avril 21 12:09 icons-64x64.tar.gz

andre@andre-dotmu:/media/andre/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11$ ls -l
total 1472
-rw------- 1 _apt root 686135 août  18 19:17 Components-amd64.yml
-rw------- 1 _apt root 239447 août  22 14:49 Components-amd64.yml.gz
-rw-r--r-- 1 root root 406642 août  22 14:49 icons-128x128.tar.gz
-rw------- 1 _apt root 165416 août  22 14:49 icons-64x64.tar.gz

现在,启动时apt-get 更新,则会出现其他错误信息。

    sudo apt-get update
    Réception de:1 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
    Réception de:1 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
//shortening//
    Réception de:12 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
    Err:12 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages
//shortening//
    Réception de:22 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata [2189 kB]
    Réception de:23 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial/main DEP-11 64x64 Icons [481 kB]
    Err:22 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial/main amd64 DEP-11 Metadata
      Impossible d'ouvrir le fichier /var/lib/apt/lists/partial
//shortening//
     Err:30 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata
      Somme de contrôle de hachage incohérente
    Réception de:31 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [205 kB]
    Ign:31 file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons
    Lecture des listes de paquets... Fait
    N: Can't drop privileges for downloading as file '/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission non accordée)
    W: The repository 'file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu xenial-security Release' does not have a Release file.
    N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: Failed to fetch file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/restricted/binary-amd64/Packages  Fichier non trouvé - /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-security/restricted/binary-amd64/Packages (2: Aucun fichier ou dossier de ce type)
    E: Failed to fetch store:/var/lib/apt/lists/partial/_media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_Components-amd64.yml  Impossible d'ouvrir le fichier /var/lib/apt/lists/partial/_media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_Components-amd64.yml - open (13: Permission non accordée)
    E: Failed to fetch file:/media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11/Components-amd64.yml  Somme de contrôle de hachage incohérente
    E: Le téléchargement de quelques fichiers d'index a échoué, ils ont été ignorés, ou les anciens ont été utilisés à la place.

为了 ”E:无法获取存储:/var/lib/apt/lists/partial/_media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_Components-amd64.yml“,我已将版权设定为777在“/var/lib/apt/lists/partial”上。以下是存储库内容的列表:

administrateur@femmeTantsaha1:/var/lib/apt/lists/partial$ ls -l
total 388
-rw-r--r-- 1 root root 246846 apr 22 02:24 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_InRelease
lrwxrwxrwx 1 root root    113 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_Components-amd64.yml -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/dep11/Components-amd64.yml
lrwxrwxrwx 1 root root    116 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_Components-amd64.yml.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/dep11/Components-amd64.yml.gz
lrwxrwxrwx 1 root root    111 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_dep11_icons-64x64.tar.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/dep11/icons-64x64.tar.gz
lrwxrwxrwx 1 root root    109 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_i18n_Translation-en.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/i18n/Translation-en.gz
lrwxrwxrwx 1 root root    109 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_main_i18n_Translation-en.xz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/main/i18n/Translation-en.xz
lrwxrwxrwx 1 root root    122 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_restricted_dep11_Components-amd64.yml.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/restricted/dep11/Components-amd64.yml.gz
lrwxrwxrwx 1 root root    115 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial_restricted_i18n_Translation-en.xz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial/restricted/i18n/Translation-en.xz
-rw-r--r-- 1 root root  95650 aog 24 08:58 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-updates_InRelease
lrwxrwxrwx 1 root root    124 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-updates_main_dep11_Components-amd64.yml.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11/Components-amd64.yml.gz
lrwxrwxrwx 1 root root    119 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-updates_main_dep11_icons-64x64.tar.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dep11/icons-64x64.tar.gz
lrwxrwxrwx 1 root root    117 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-updates_main_i18n_Translation-en.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/i18n/Translation-en.gz
lrwxrwxrwx 1 root root    117 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-updates_main_i18n_Translation-en.xz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/main/i18n/Translation-en.xz
lrwxrwxrwx 1 root root    130 aog 24 09:44 _media_administrateur_Depots_miroir_mirror_archive.ubuntu.com_ubuntu_dists_xenial-updates_restricted_dep11_Components-amd64.yml.gz -> /media/administrateur/Depots/miroir/mirror/archive.ubuntu.com/ubuntu/dists/xenial-updates/restricted/dep11/Components-amd64.yml.gz

似乎有一些符号链接,除了我添加的 2 个“.yml”文件外,其他文件都指向档案。而那 2 个文件带来了错误报告。

我真的力不从心,而且我已经尝试了一段时间才成功。有什么想法吗?

答案1

在客户端,这似乎是一个漏洞。我在全新安装 17.04 时也遇到了类似的问题。

发出命令appstreamcli refresh --force为我解决了这个问题。

相关内容