简体   繁体   English

安装 pycrypto 时出错(使用 pyPrivnote)

[英]Error installing pycrypto (with pyPrivnote)

I've been trying to install pycrypto for the last couple hours now and its not really working, could someone please help?在过去的几个小时里,我一直在尝试安装 pycrypto,但它并没有真正工作,有人可以帮忙吗?

The commands and steps I've tried我尝试过的命令和步骤
pip install pycrypto
easy_install pycrypto
Installing Build Tools安装构建工具

But i keep getting the following error: https://pastebin.com/GatwaM9n , can someone help?但我不断收到以下错误: https://pastebin.com/GatwaM9n ,有人可以帮忙吗? (I ran installation as admin too) (我也以管理员身份运行安装)

Mostly copying from https://stackoverflow.com/a/58077358/7976758 by @winklerrr: @winklerrr 主要从https://stackoverflow.com/a/58077358/7976758复制:

WARNING: Don't use crypto or pycrypto anymore!警告:不要再使用cryptopycrypto了!

As you can read on this page , the usage of pycrypto is not safe anymore:正如您在 此页面上所读到的, pycrypto的使用不再安全:

Pycrypto is vulnerable to a heap-based buffer overflow in the ALGnew function in block_templace.c. Pycrypto 容易受到 block_templace.c 中 ALGnew function 中基于堆的缓冲区溢出的影响。 It allows remote attackers to execute arbitrary code in the python application.它允许远程攻击者在 python 应用程序中执行任意代码。 It was assigned the CVE-2013-7459 number.它被分配了CVE-2013-7459编号。

Pycrypto didn't release any fix to that vulnerability and no commit was made to the project since Jun 20, 2014. Pycrypto 没有针对该漏洞发布任何修复程序,并且自 2014 年 6 月 20 日以来没有对该项目进行任何提交。

Update 2021-01-18: The CVE is fixed now (thanks @SumitBadsara for pointing it out.): You can find the current status of the open security tickets for each package at the Debian security tracker: 2021-01-18 更新: CVE 现已修复(感谢 @SumitBadsara 指出。):您可以在 Debian 安全跟踪器中找到每个 package 的开放安全票的当前状态:

Use Python3's pycryptodome instead!改用 Python3 的pycryptodome

Make sure to uninstall all versions of crypto and pycrypto first, then install pycryptodome :确保首先卸载所有版本的cryptopycrypto ,然后安装pycryptodome

pip3 uninstall crypto 
pip3 uninstall pycrypto 
pip3 install pycryptodome

( phd — skipping a part about virtual environments…) 博士——跳过关于虚拟环境的部分……)

All of these three packages get installed to the same folder, named Crypto .所有这三个包都安装到同一个文件夹,名为Crypto Installing different packages under the same folder name can be a common source for errors!在相同的文件夹名称下安装不同的包可能是错误的常见来源!

For more information, see pycryptodome.org有关更多信息,请参阅pycryptodome.org

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM