首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >"EOFError: EOF在安装python-rpi.gpio时读取期望对象的位置“

"EOFError: EOF在安装python-rpi.gpio时读取期望对象的位置“
EN

Unix & Linux用户
提问于 2016-01-16 20:42:29
回答 2查看 2.8K关注 0票数 0

在彻底安装Raspbian Jessie (Raspberry pi 2)时,在第一次尝试升级时会发生错误:

代码语言:javascript
复制
Preparing to unpack .../python-rpi.gpio_0.6.1-1_armhf.deb ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 31, in <module>
    from debpython import files as dpf
EOFError: EOF read where object expected
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
Traceback (most recent call last):
  File "/usr/bin/pyclean", line 31, in <module>
    from debpython import files as dpf
EOFError: EOF read where object expected
dpkg: error processing archive /var/cache/apt/archives/python-rpi.gpio_0.6.1-1_armhf.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 37, in <module>
    from debpython import files as dpf
EOFError: EOF read where object expected
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Preparing to unpack .../python3-rpi.gpio_0.6.1-1_armhf.deb ...
Unpacking python3-rpi.gpio (0.6.1-1) over (0.6.0a3-1) ...
Preparing to unpack .../raspi-config_20160108_all.deb ...
Unpacking raspi-config (20160108) over (20151117) ...
Preparing to unpack .../rc-gui_0.4-1_armhf.deb ...
Unpacking rc-gui (0.4-1) over (0.3-2) ...
Preparing to unpack .../sudo_1.8.10p3-1+deb8u3_armhf.deb ...
Unpacking sudo (1.8.10p3-1+deb8u3) over (1.8.10p3-1+deb8u2) ...
Preparing to unpack .../sonic-pi_1%3a2.9.0-1_armhf.deb ...
Unpacking sonic-pi (1:2.9.0-1) over (1:2.7.0-1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for systemd (215-17+deb8u2) ...
Processing triggers for gnome-menus (3.13.3-6) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for gnome-icon-theme (3.12.0-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/python-rpi.gpio_0.6.1-1_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

在阅读之后,问题似乎在于python-rpi.gpio。如何克服它的问题。最重要的是,因为现在没有其他安装的可能。

不幸的是,像apt-get cleandpkg --configure -a这样的常见建议没有帮助。

代码语言:javascript
复制
ldconfig
/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libatomic.so.1.1.0 is not an ELF file - it has the wrong magic bytes at the start.
/sbin/ldconfig.real: /usr/lib/arm-linux-gnueabihf/libatomic.so.1 is not an ELF file - it has the wrong magic bytes at the start.

除了降级到Raspbian之外,还能做什么?

EN

回答 2

Unix & Linux用户

回答已采纳

发布于 2018-07-19 06:59:32

实际原因是一个错误的SD卡,错误地实现了删除功能,在升级期间的删除也改变了其他文件。

票数 0
EN

Unix & Linux用户

发布于 2016-01-24 08:38:50

手动获取sonic-pi并重试..。

代码语言:javascript
复制
wget http://sonic-pi.net/files/releases/v2.9.0/Sonic-Pi-for-RPi-Jessie-v2.9.0.tgz
tar -xvzf Sonic-Pi-for-RPi-Jessie-v2.9.0.tgz
票数 -1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/255772

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档