我正在尝试在 Fedora 14 (x86_64bit) 上安装 Altera Quartus 10 web edition 32 bit
(但我认为只有 32 位部分与我的问题相关),它在 VM 内运行。
当我运行安装程序时:
./altera_installer_cmd --install=quartus_free (...and some more options)
我收到以下错误:
Traceback (most recent call last):
File "<string>", line 18, in <module>
File "/tools/python/2.6.4/linux32/pyinstaller/iu.py",
line 436, in importHook
File "/tools/python/2.6.4/linux32/pyinstaller/iu.py",
line 521, in doimport
File "linux32/build/pyi.linux2/quartus_dl/outPYZ1.pyz/hashlib",
line 136, in <module>
File "linux32/build/pyi.linux2/quartus_dl/outPYZ1.pyz/hashlib",
line 63, in __get_builtin_constructor
File "/tools/python/2.6.4/linux32/pyinstaller/iu.py",
line 455, in importHook ImportError:
No module named _md5
我不知道这些文件位于何处,因为该路径似乎/tools
不存在。
看起来,安装程序想要使用,python 2.6.4
而我的常规安装使用的是 python 2.7
$python --version
Python 2.7
有人知道如何解决这个问题吗?
编辑1: (为简洁起见,删除了部分内容)
不幸的是,安装程序是一个二进制文件:
$ file altera_installer_cmd
altera_installer_cmd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
$ ldd altera_installer_cmd
linux-gate.so.1 => (0x00424000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00990000)
libdl.so.2 => /lib/libdl.so.2 (0x007c7000)
libutil.so.1 => /lib/libutil.so.1 (0x00fc0000)
libm.so.6 => /lib/libm.so.6 (0x006bf000)
libz.so.1 => /lib/libz.so.1 (0x0069f000)
libc.so.6 => /lib/libc.so.6 (0x4b653000)
/lib/ld-linux.so.2 (0x4b62f000)
这里是安装程序目录中所有文件和文件夹的列表。如您所见,没有文件夹/tools
。但是有一个文件_hashlib.so
(第 27 行)。
编辑2:
我重新安装了 python,然后导入hashlib
就没有问题了:
# python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> exit()
之后我altera_installer_cmd
按照上面所述运行,但出现了同样的错误。如果我现在运行 python 并导入,hashlib
我会再次收到错误
$ python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.7/hashlib.py", line 136, in <module>
globals()[__func_name] = __get_hash(__func_name)
File "/usr/lib64/python2.7/hashlib.py", line 74, in __get_builtin_constructor
import _sha256
ImportError: ./_sha256.so: wrong ELF class: ELFCLASS32
>>>