python可以';t安装、构建pycrypto

python可以';t安装、构建pycrypto,python,python-3.x,gcc,pycrypto,dd-wrt,Python,Python 3.x,Gcc,Pycrypto,Dd Wrt,安装“pip3安装pycrypto”时,我出现以下错误: creating build/lib.linux-armv7l-3.6/Crypto/Protocol copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-arm

安装“pip3安装pycrypto”时,我出现以下错误:

   creating build/lib.linux-armv7l-3.6/Crypto/Protocol
    copying lib/Crypto/Protocol/AllOrNothing.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
    copying lib/Crypto/Protocol/Chaffing.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
    copying lib/Crypto/Protocol/KDF.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
    copying lib/Crypto/Protocol/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/Protocol
    creating build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    creating build/lib.linux-armv7l-3.6/Crypto/Signature
    copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
    copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
    copying lib/Crypto/Signature/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
    warning: PCTBuildPy: byte-compiling is disabled, skipping.

    running build_ext
    running build_configure
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... configure: error: in `/tmp/pip-build-71pdfh2i/pycrypto':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-71pdfh2i/pycrypto/setup.py", line 456, in <module>
        core.setup(**kw)
      File "/core.py", line 148, in setup
      File "/dist.py", line 955, in run_commands
      File "/dist.py", line 974, in run_command
      File "/opt/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/install.py", line 545, in run
      File "/cmd.py", line 313, in run_command
      File "/dist.py", line 974, in run_command
      File "/build.py", line 135, in run
      File "/cmd.py", line 313, in run_command
      File "/dist.py", line 974, in run_command
      File "/tmp/pip-build-71pdfh2i/pycrypto/setup.py", line 251, in run
        self.run_command(cmd_name)
      File "/cmd.py", line 313, in run_command
      File "/dist.py", line 974, in run_command
      File "/tmp/pip-build-71pdfh2i/pycrypto/setup.py", line 278, in run
        raise RuntimeError("autoconf error")
    RuntimeError: autoconf error

    ----------------------------------------
Command "/opt/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-71pdfh2i/pycrypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-cbi74gir-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-71pdfh2i/pycrypto/
当使用TMPDIR=/opt/tmp pip3安装pycrypto时,我也遇到了问题(谷歌显示TMPDIR必须在没有“noexec”的情况下安装):

请告知如何解决此问题


谢谢大家!

我认为您在编译器尝试为您的平台构建二进制代码时遇到了问题。你已经检查过这个说明了吗?应该留下一个
config.log
文件,其中包含实际的错误消息。请在您的问题中包括这一点。谢谢,在安装软件包和source/opt/bin/gcc_env.sh之后。我能够pip3安装pycypto。我想您在编译器尝试为您的平台构建二进制代码时遇到了问题。你已经检查过这个说明了吗?应该留下一个
config.log
文件,其中包含实际的错误消息。请在您的问题中包括这一点。谢谢,在安装软件包和source/opt/bin/gcc_env.sh之后。我能够pip3安装pycypto。
root@router2:~# mount
/dev/root on / type squashfs (ro,relatime)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
ramfs on /tmp type ramfs (rw,relatime)
none on /dev type tmpfs (rw,relatime,size=512K)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
devpts on /proc/bus/usb type usbfs (rw,relatime)
/dev/sda1 on /opt type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /tmp/mnt/sda1 type ext4 (rw,relatime,data=ordered)
    creating build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/pubkey.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/_slowmath.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/RSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/DSA.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    copying lib/Crypto/PublicKey/ElGamal.py -> build/lib.linux-armv7l-3.6/Crypto/PublicKey
    creating build/lib.linux-armv7l-3.6/Crypto/Signature
    copying lib/Crypto/Signature/PKCS1_v1_5.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
    copying lib/Crypto/Signature/PKCS1_PSS.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
    copying lib/Crypto/Signature/__init__.py -> build/lib.linux-armv7l-3.6/Crypto/Signature
    warning: PCTBuildPy: byte-compiling is disabled, skipping.

    running build_ext
    running build_configure
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... configure: error: in `/opt/tmp/pip-build-ve5o0p9a/pycrypto':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py", line 456, in <module>
        core.setup(**kw)
      File "/core.py", line 148, in setup
      File "/dist.py", line 955, in run_commands
      File "/dist.py", line 974, in run_command
      File "/opt/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/install.py", line 545, in run
      File "/cmd.py", line 313, in run_command
      File "/dist.py", line 974, in run_command
      File "/build.py", line 135, in run
      File "/cmd.py", line 313, in run_command
      File "/dist.py", line 974, in run_command
      File "/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py", line 251, in run
        self.run_command(cmd_name)
      File "/cmd.py", line 313, in run_command
      File "/dist.py", line 974, in run_command
      File "/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py", line 278, in run
        raise RuntimeError("autoconf error")
    RuntimeError: autoconf error

    ----------------------------------------
Command "/opt/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/opt/tmp/pip-build-ve5o0p9a/pycrypto/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /opt/tmp/pip-xa11ohvn-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /opt/tmp/pip-build-ve5o0p9a/pycrypto/
Platform:
Buffalo WZR-1750DHP
Firmware: DD-WRT v3.0-r33006 std (08/03/17)