当前位置:   article > 正文

E: Sub-process /usr/bin/dpkg returned an error code (1)_dpkg: error processing archive /var/cache/apt/arch

dpkg: error processing archive /var/cache/apt/archives/python3-catkin-pkg-mo

安装ROS2的devtools时,遇到一个很烦的问题:

Errors were encountered while processing:
 /var/cache/apt/archives/python3-catkin-pkg-modules_0.5.2-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

一直报这个错。

手动  sudo apt-get install python3-catkin-pkg-modules 安装也是一样。还提示:

dpkg: error processing archive /var/cache/apt/archives/python3-catkin-pkg-modules_0.5.2-1_all.deb (--unpack):
 trying to overwrite '/usr/lib/python3/dist-packages/catkin_pkg/__init__.py', which is also in package python3-catkin-pkg 0.4.24-2

最后是这样解决的:

sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bk  # 备份一下

sudo mkdir /var/lib/dpkg/info

sudo apt-get update

 sudo apt-get install -f

居然就正常安装了。

后面的安装步骤就很顺利了。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/花生_TL007/article/detail/195809
推荐阅读
相关标签
  

闽ICP备14008679号