gpt4 book ai didi

python - apt-dpkg python-rpi.gpio依赖问题

转载 作者:行者123 更新时间:2023-12-03 09:52:23 25 4
gpt4 key购买 nike

每当我尝试安装某些东西,升级或自动删除时,都会发生此错误!
我已经在网上搜索并尝试了一些修复程序,但是它们似乎没有用,我没有只安装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卡,特别是失去我拥有的东西,其次,当我遵循此 guide时,我尝试了sudo apt-get install -fsudo apt update --fix-missingsudo dpkg --remove --force-remove --reinstreq命令显示此错误 dpkg: error: unknown force/refuse option 'remove'

最佳答案

使用以下命令:

sudo dpkg -i --force-overwrite /var/cache/apt/archives//python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb
仍然有同样的问题,使用:
sudo mv /var/lib/dpkg/info/python-rpi.gpio.* /tmp/
sudo dpkg --remove --force-remove-reinstreq python-rpi.gpio
您的命令 sudo dpkg --remove --force-remove --reinstreq中的错字无效。正确的选项是 --force-remove-reinstreq。参见 dpkg --force-help

关于python - apt-dpkg python-rpi.gpio依赖问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65793271/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com