美文网首页
Ubuntu上的pycrypto给出了编译器错误

Ubuntu上的pycrypto给出了编译器错误

作者: 不_一 | 来源:发表于2019-01-22 20:27 被阅读0次

    我试图用Python 2.7.3 在Ubuntu 10.04(Lucid Lynx)上安装pycrypto2.6 。

    我遇到以下错误:

    running build
    running build_py
    running build_ext
    running build_configure
    checking for gcc... no
    checking for cc... no
    checking for cl.exe... no
    configure: error: in `/home/pratibha/Desktop/pycrypto-2.6':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details
    Traceback (most recent call last):
    File "setup.py", line 456, in <module>
    core.setup(**kw)
    File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
    File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
    File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "/usr/local/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
    File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "setup.py", line 251, in run
    self.run_command(cmd_name)
    File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
    File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
    File "setup.py", line 278, in run
    raise RuntimeError("autoconf error")
    RuntimeError: autoconf error
    

    解决方法

    sudo apt-get install python-dev
    

    参考

    相关文章

      网友评论

          本文标题:Ubuntu上的pycrypto给出了编译器错误

          本文链接:https://www.haomeiwen.com/subject/ceirjqtx.html