重要性/lib/ldlinuxarmhf.so.3:找不到版本“gLIB\u 2.4”

2024-05-23 18:22:44 发布

您现在位置:Python中文网/ 问答频道 /正文

我目前收到一个导入错误,它似乎发生在python的requests模块上。这是我在RPi上遇到的错误

Traceback (most recent call last):
  File "pathfinderAllocator.py", line 4, in <module>
    import requests
  File "/usr/local/lib/python2.7/dist-packages/requests-2.7.0-py2.7.egg/requests/__init__.py", line 58, in <module>
    from . import utils
  File "/usr/local/lib/python2.7/dist-packages/requests-2.7.0-py2.7.egg/requests/utils.py", line 15, in <module>
    import io
  File "/usr/lib/python2.7/io.py", line 51, in <module>
    import _io
ImportError: /lib/ld-linux-armhf.so.3: version `gLIB▒_2.4' not found (required by /usr/lib/python2.7/lib-dynload/_io.so)

我试着去那个目录,我可以看到/lib/ldlinux-armhf.so.公司.3存在。然后我尝试在/usr/lib/python2.7/lib-dynload上执行ldd/_io.so然后回来说有一些文件丢失了?在

^{pr2}$

我的pi上只有一个python安装,那就是python2.7

这是我的libc6版本

Package: libc6
State: installed
Automatically installed: no
Multi-Arch: same
Version: 2.19-18+deb8u1
Priority: required
Section: libs
Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org>
Architecture: armhf
Uncompressed Size: 9,000 k
Depends: libgcc1
Suggests: glibc-doc, debconf | debconf-2.0, locales
Conflicts: prelink (<= 0.0.20090311-1), tzdata (< 2007k-1), tzdata-etch
Breaks: hurd (< 1:0.5.git20140203-1), libtirpc1 (< 0.2.3), locales (< 2.19), locales-all (< 2.19), nscd (< 2.19)
Description: GNU C Library: Shared libraries
 Contains the standard libraries that are used by nearly all programs on the system. This package includes shared versions of the standard C library and the standard math library, as well as many
 others.
Homepage: http://www.gnu.org/software/libc/libc.html

我也尝试过使用sudo apt get install glib2.0

    Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libglib2.0-0-refdbg' for regex 'glib2.0'
Note, selecting 'libglib2.0-bin' for regex 'glib2.0'
Note, selecting 'libglib2.0-dbg' for regex 'glib2.0'
Note, selecting 'libglib2.0-cil' for regex 'glib2.0'
Note, selecting 'libglib2.0-dev' for regex 'glib2.0'
Note, selecting 'libglib2.0-doc' for regex 'glib2.0'
Note, selecting 'libglib2.0-cil-dev' for regex 'glib2.0'
Note, selecting 'libtaglib2.0-cil' for regex 'glib2.0'
Note, selecting 'libdbus-glib2.0-cil' for regex 'glib2.0'
Note, selecting 'libdbus-glib2.0-cil-dev' for regex 'glib2.0'
Note, selecting 'libglib2.0-data' for regex 'glib2.0'
Note, selecting 'libglib2.0-tests' for regex 'glib2.0'
Note, selecting 'libglib2.0-0' for regex 'glib2.0'
Note, selecting 'libglib2.0-0-dbg' for regex 'glib2.0'
libglib2.0-0 is already the newest version.
libglib2.0-0 set to manually installed.
libglib2.0-data is already the newest version.
libglib2.0-data set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libglib2.0-bin : Depends: libelfg0 (>= 0.8.12) but it is not installable
E: Unable to correct problems, you have held broken packages.

Tags: installedthepyioforlibpackagesusr
1条回答
网友
1楼 · 发布于 2024-05-23 18:22:44

python2.7/lib-dynload/_io.so是一个基本的Python-2.7文件。示例:

 $ objdump -Dslx /usr/lib/python2.7/lib-dynload/_io.so  | grep -i gLIB
    0x0d696912 0x00 07 GLIBC_2.2
    0x0d696910 0x00 03 GLIBC_2.0
    0x0d696911 0x00 08 GLIBC_2.1
    0x0d696912 0x00 06 GLIBC_2.2
    0x09691f73 0x00 05 GLIBC_2.1.3
    0x0d696914 0x00 04 GLIBC_2.4
    0x0d696910 0x00 02 GLIBC_2.0
 203c 474c4942 435f322e 3200474c 4942435f  GLIBC_2.2.GLIBC_
 204c 322e3000 474c4942 435f322e 3100474c  2.0.GLIBC_2.1.GL
 205c 4942435f 322e312e 3300474c 4942435f  IBC_2.1.3.GLIBC_

这里的奥秘在于,glibc=libc6似乎没有名为glibc_2.4的对象。在

为什么你的操作系统中的Python-2.7是用不同的glibc编译的?在


相关问题 更多 >