当前位置: 首页 > article >正文

【debug】dpkg: error processing archive...Invalid cross-device link

更新系统驱动后,sudo apt install 时出现:

The following packages have unmet dependencies:
 nvidia-dkms-535 : Depends: nvidia-firmware-535-535.183.01 but it is not going to be installed
 nvidia-driver-535 : Depends: libnvidia-compute-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
                     Depends: libnvidia-extra-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
                     Depends: nvidia-compute-utils-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
                     Depends: libnvidia-decode-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
                     Depends: libnvidia-encode-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
                     Depends: nvidia-utils-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
                     Depends: libnvidia-cfg1-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
                     Recommends: libnvidia-compute-535:i386 (= 535.183.01-0ubuntu0.24.04.1) but it is not installable
                     Recommends: libnvidia-decode-535:i386 (= 535.183.01-0ubuntu0.24.04.1) but it is not installable
                     Recommends: libnvidia-encode-535:i386 (= 535.183.01-0ubuntu0.24.04.1) but it is not installable
                     Recommends: libnvidia-fbc1-535:i386 (= 535.183.01-0ubuntu0.24.04.1) but it is not installable
                     Recommends: libnvidia-gl-535:i386 (= 535.183.01-0ubuntu0.24.04.1) but it is not installable
 nvidia-kernel-common-535 : Depends: nvidia-firmware-535-535.183.01 but it is not going to be installed
 xserver-xorg-video-nvidia-535 : Depends: libnvidia-cfg1-535 (= 535.183.01-0ubuntu0.24.04.1) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

尝试apt --fix-broken install,报错:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libnvidia-cfg1-535 libnvidia-compute-535 libnvidia-decode-535 libnvidia-encode-535 libnvidia-extra-535 nvidia-compute-utils-535
  nvidia-firmware-535-535.183.01 nvidia-utils-535
The following NEW packages will be installed:
  libnvidia-cfg1-535 libnvidia-compute-535 libnvidia-decode-535 libnvidia-encode-535 libnvidia-extra-535 nvidia-compute-utils-535
  nvidia-firmware-535-535.183.01 nvidia-utils-535
0 upgraded, 8 newly installed, 0 to remove and 791 not upgraded.
4 not fully installed or removed.
Need to get 82.5 MB of archives.
After this operation, 250 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 nvidia-firmware-535-535.183.01 amd64 535.183.01-0ubuntu0.24.04.1 [39.6 MB]
Get:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 libnvidia-compute-535 amd64 535.183.01-0ubuntu0.24.04.1 [40.3 MB]
Get:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 libnvidia-extra-535 amd64 535.183.01-0ubuntu0.24.04.1 [71.5 kB]
Get:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 nvidia-compute-utils-535 amd64 535.183.01-0ubuntu0.24.04.1 [122 kB]
Get:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 libnvidia-decode-535 amd64 535.183.01-0ubuntu0.24.04.1 [1886 kB]
Get:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 libnvidia-encode-535 amd64 535.183.01-0ubuntu0.24.04.1 [97.3 kB]
Get:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 nvidia-utils-535 amd64 535.183.01-0ubuntu0.24.04.1 [405 kB]
Get:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu noble-updates/restricted amd64 libnvidia-cfg1-535 amd64 535.183.01-0ubuntu0.24.04.1 [108 kB]
Fetched 82.5 MB in 18s (4645 kB/s)                                                                                                    
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 8.)
debconf: falling back to frontend: Readline
(Reading database ... 101979 files and directories currently installed.)
Preparing to unpack .../0-nvidia-firmware-535-535.183.01_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-firmware-535-535.183.01 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/0-nvidia-firmware-535-535.183.01_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './lib/firmware/nvidia/535.183.01/gsp_ga10x.bin' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../1-libnvidia-compute-535_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking libnvidia-compute-535:amd64 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/1-libnvidia-compute-535_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './usr/lib/x86_64-linux-gnu/libcuda.so.535.183.01' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../2-libnvidia-extra-535_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking libnvidia-extra-535:amd64 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/2-libnvidia-extra-535_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './usr/lib/x86_64-linux-gnu/libnvidia-allocator.so.535.183.01' before installing new version: Invalid cross-device link
Preparing to unpack .../3-nvidia-compute-utils-535_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-compute-utils-535 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/3-nvidia-compute-utils-535_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './usr/bin/nvidia-cuda-mps-control' before installing new version: Invalid cross-device link
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../4-libnvidia-decode-535_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking libnvidia-decode-535:amd64 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/4-libnvidia-decode-535_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './usr/lib/x86_64-linux-gnu/libnvcuvid.so.535.183.01' before installing new version: Invalid cross-device link
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../5-libnvidia-encode-535_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking libnvidia-encode-535:amd64 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/5-libnvidia-encode-535_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './usr/lib/x86_64-linux-gnu/libnvidia-encode.so.535.183.01' before installing new version: Invalid cross-device link
No apport report written because MaxReports is reached already
                                                              Preparing to unpack .../6-nvidia-utils-535_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking nvidia-utils-535 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/6-nvidia-utils-535_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './usr/bin/nvidia-debugdump' before installing new version: Invalid cross-device link
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Preparing to unpack .../7-libnvidia-cfg1-535_535.183.01-0ubuntu0.24.04.1_amd64.deb ...
Unpacking libnvidia-cfg1-535:amd64 (535.183.01-0ubuntu0.24.04.1) ...
dpkg: error processing archive /tmp/apt-dpkg-install-rrVpFY/7-libnvidia-cfg1-535_535.183.01-0ubuntu0.24.04.1_amd64.deb (--unpack):
 unable to make backup link of './usr/lib/x86_64-linux-gnu/libnvidia-cfg.so.535.183.01' before installing new version: Invalid cross-device link
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 /tmp/apt-dpkg-install-rrVpFY/0-nvidia-firmware-535-535.183.01_535.183.01-0ubuntu0.24.04.1_amd64.deb
 /tmp/apt-dpkg-install-rrVpFY/1-libnvidia-compute-535_535.183.01-0ubuntu0.24.04.1_amd64.deb
 /tmp/apt-dpkg-install-rrVpFY/2-libnvidia-extra-535_535.183.01-0ubuntu0.24.04.1_amd64.deb
 /tmp/apt-dpkg-install-rrVpFY/3-nvidia-compute-utils-535_535.183.01-0ubuntu0.24.04.1_amd64.deb
 /tmp/apt-dpkg-install-rrVpFY/4-libnvidia-decode-535_535.183.01-0ubuntu0.24.04.1_amd64.deb
 /tmp/apt-dpkg-install-rrVpFY/5-libnvidia-encode-535_535.183.01-0ubuntu0.24.04.1_amd64.deb
 /tmp/apt-dpkg-install-rrVpFY/6-nvidia-utils-535_535.183.01-0ubuntu0.24.04.1_amd64.deb
 /tmp/apt-dpkg-install-rrVpFY/7-libnvidia-cfg1-535_535.183.01-0ubuntu0.24.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

按照网上的方法尝试覆盖包、手动一次安装、强制安装,都无用,仍是一样的报错

类似的问题:Unable to install cuda (11.3) inside Ubuntu docker environment - CUDA / CUDA Setup and Installation - NVIDIA Developer Forums

无果,不是cuda指向错误

同样的错误:Unable to docker build on Linux kernel 4.19 · Issue #480 · docker/for-linux (github.com)

提到该报错有可能是 overlayfs 的问题或 dpkg 与 overlayfs 不兼容的问题。

Invalid cross-device link 错误通常在以下情况下发生:

  1. 跨文件系统操作:overlayfs 下的不同层可能被视为不同的文件系统,因此无法跨文件系统创建硬链接或符号链接。
  2. 虚拟化限制:在 Docker 容器或虚拟化环境中,使用 overlayfs 可能会导致文件操作的限制。

解决:

1.禁用 overlayfs 中的 metacopy:

echo N | sudo tee /sys/module/overlay/parameters/metacopy

报错:tee: /sys/module/overlay/parameters/metacopy: Read-only file system N

表示/sys/module/overlay/parameters/metacopy 文件所在的文件系统是只读的,因此无法修改 metacopy 参数。

只得求助外援,从宿主机那边格式化了容器,解决


http://www.kler.cn/a/293983.html

相关文章:

  • Java项目实战II基于微信小程序的个人行政复议在线预约系统微信小程序(开发文档+数据库+源码)
  • PHP搭建开发环境(Windows系统)
  • Linux相关习题-gcc-gdb-冯诺依曼
  • 【Python】爬虫通过验证码
  • 洞察鸿蒙生态,把握开发新机遇
  • js-将JavaScript对象或值转换为JSON字符串 JSON.stringify(this.SelectDataListCourse)
  • pgrx在docker中问题无法解决
  • gitlab 启动/关闭/启用开机启动/禁用开机启动
  • 关于HTTP SESSION
  • 算法复盘——Leetcode hot100: 双指针算法
  • 软件测试基础总结+面试八股文
  • Vue2电商项目(二) Home模块的开发;(还需要补充js节流和防抖的回顾链接)
  • 数据结构(单向链表)
  • 软文发稿相比其他广告形式有哪些持续性优势?
  • 如何从硬盘恢复已删除/丢失的文件?硬盘恢复已删除的文件技巧
  • 如何录制黑神话悟空的游戏BGM导入iPhone手机制作铃声?
  • notepad下载安装使用以及高级使用技巧
  • Vue 中 nextTick 的最主要作用是什么,为什么要有这个 API
  • spring项目使用邮箱验证码校验
  • Vue3状态管理Pinia
  • APS开源源码解读: 排程工具 optaplanner
  • PHP批量修改MySQL数据表字符集为utf8mb4/utf8mb4_unicode_ci
  • 全网首发!!!opencv三通道Mat点云转halcon点云—HTuple类型
  • linux编译出现报错
  • ★ 算法OJ题 ★ 力扣3 - 无重复字符的最长子串
  • 百家云 BRTC:革新华为 HarmonyOS NEXT 系统的实时通信体验