【发布时间】:2021-01-19 14:13:37
【问题描述】:
每次我尝试安装某些东西时,都会发生升级或自动删除此错误!
我已经在网上搜索并尝试了一些修复,但它们似乎不起作用,我没有安装 python2.7 仅 3 并且因此无法安装 python2 或任何东西。我试过 sudo rm python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb 但文件会继续运行。请问我真的需要一些帮助,因为我在我的 pi 上有一些工作并且不想获得新图像
sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
python-rpi.gpio
The following packages will be upgraded:
python-rpi.gpio
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
18 not fully installed or removed.
Need to get 0 B/20.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 152893 files and directories currently installed.)
Preparing to unpack .../python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb ...
/var/lib/dpkg/info/python-rpi.gpio.prerm: 6: /var/lib/dpkg/info/python-rpi.gpio.prerm: pyclean: Too many levels of symbolic links
dpkg: warning: old python-rpi.gpio package pre-removal script subprocess returned error exit status 2
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: Too many levels of symbolic links
dpkg: error processing archive /var/cache/apt/archives/python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb (--unpack):
new python-rpi.gpio package pre-removal script subprocess returned error exit status 2
/var/lib/dpkg/info/python-rpi.gpio.postinst: 6: /var/lib/dpkg/info/python-rpi.gpio.postinst: pycompile: Too many levels of symbolic links
dpkg: error while cleaning up:
installed python-rpi.gpio package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
一些注意事项:我真的不想更换 SD 卡并部分丢失我所拥有的,其次我尝试了 sudo apt-get install -f 和 sudo apt update --fix-missing,当我遵循 guide sudo dpkg --remove --force-remove --reinstreq 命令时显示此错误dpkg: error: unknown force/refuse option 'remove'
【问题讨论】:
标签: python linux raspberry-pi apt dpkg