charm-crypto库安装

安装过程中踩了很多坑,总结一下

Linux 安装

参考博客

charm安装:https://blog.csdn.net/qq_34823530/article/details/96605662

python3.7安装:https://cloud.tencent.com/developer/article/1570488

ubuntu下yum安装:https://blog.csdn.net/zhangwen_x/article/details/100580477(yum安装报错的情况下,更新数据源到清华源不起作用,更新到阿里云就解决了)

安装python37的报错处理:https://blog.csdn.net/u014775723/article/details/85224447?spm=1001.2101.3001.6650.4&utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-4-85224447-blog-121011929.pc_relevant_antiscanv2&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-4-85224447-blog-121011929.pc_relevant_antiscanv2&utm_relevant_index=5

安装过程

0 安装yum

sudo apt-get update
sudo apt-get upgrade
apt-get install yum

如果直接用这个命令没用,那就挺费劲了,如下

(我遇到的问题是 找不到包的位置Unable to locate package)

有效的方法是添加数据源,一开始添加了清华源还是不行,后来添加了阿里源,就ok了,就可以再用上面的命令安装成功了

cd /etc/apt/
sudo cp /etc/apt/sources.list   /etc/apt/sources.list.backup
sudo gedit sources.list    #当使用gedit不行,就用的nano

添加如下内容:

deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security universe
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security multiverse
# 应该是下面的阿里云源起作用了
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

添加完一定要记得update和upgrade

1 修改python版本

为了使得库能够正常运行,将python版本设置为3.7。如果已经是3.7可以忽略这一步

cd /usr/local/
mkdir Python37     //创建一个文件夹用于存放下载的python3压缩包
wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz   //linux下载python3.7.0指令
tar -zxvf Python-3.7.0.tgz
mkdir /usr/local/Python/py3_project
cd Python-3.7.0
./configure --prefix=/usr/local/python3   //配置
make && make install   //编译并且安装

最后两步可能会报错(如下),主要是因为缺少依赖

There are no enabled repos.Run "yum repolist all" to see the repos you have.To enable Red Hat Subscription Management repositories:subscription-manager repos --enable <repo>To enable custom repositories:yum-config-manager --enable <repo>

此时使用"yum repolist all"命令的返回值为0

安装依赖包,亲测使用aptitude命令安装最靠谱

sudo apt-get install aptitude# sudo aptitude pachagename
sudo aptitude dist-upgrade
sudo aptitude install build-essential python-dev python-setuptools python-pip python-smbus
sudo aptitude install build-essential libncursesw5-dev libgdbm-dev libc6-dev
sudo aptitude install zlib1g-dev libsqlite3-dev tk-dev
sudo aptitude install libssl-dev openssl
sudo aptitude install libffi-dev
yum -y install openssl-devel# 到py37的文件夹下
./configure --prefix=/usr/local/python3   //配置
make && make install   //编译并且安装

建立软连接

ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3

2 准备文件

先用第一个链接里面给到的云盘下载文件

链接:https://pan.baidu.com/s/14FLFP7jMWdZ337DcrGf_lQ
提取码:zhhl

3 执行安装

必须安装依赖库:GMP,PBC,OPENSSL

sudo apt-get install m4
sudo apt-get install flex
sudo apt-get install bison

安装gmp,pbc,openssl库(下载上面的云盘的包)或者在下面的网站上下载

​ Pyparsing http://pyparsing.wikispaces.com/ 这个装python的时候就装了
​ GMP 5.x http://gmplib.org/
​ PBC (latest) http://crypto.stanford.edu/pbc/news.html
​ OPENSSL http://www.openssl.org/

把每个安装包解压,然后./configure make make install 三步走

注意:
OpenSSL是 ./config make make install

最后用同样的方式解压,并安装charm-crypto

./configure.sh
make && make install

Windows 安装

(待更新……)

charm-crypto库安装相关推荐

  1. linux 安装库 编译提示-lcrypto 无法链接,缺少 crypto 库

    linux 安装库 缺少 crypto 库 编译提示-lcrypto 无法链接,缺少 crypto 库 方法一 ------------------------------------- crypto ...

  2. python crypto安装_关于python安装pip及crypto库

    Capture The Flag (CTF) 常用到的crypto库,有很多技术人员不知道怎么安装.而crypto库已经有三五年没有团队维护更新,网络上很多旧版安装方法不可用.本篇记录了作者安装pip ...

  3. Crypto windows 安装

    Crypto win 安装 pycrypto,pycrytodome和crypto是一个东西,在很久以前,crypto在python上面的名字是pycrypto它是一个第三方库,但是已经停止更新三年了 ...

  4. Python——Crypto库实现公钥加密私钥解密

    目录 RSA介绍 openssl生成公钥和私钥 python实现生成公私钥 PKCS1_v1_5包 数据加密以及解密 导入相关包 数据加密 数据解密 效果展示 Crypto 模块提供了加密功能,包含对 ...

  5. 关于python中Crypto库和pycrypto库无法使用的解决方法

    Crypto库和pycrypto库为什么无法使用本人在此不做过多阐述,有兴趣的朋友可以自行百度,下面我将讲解解决方法: pycryptodome是Crypto和pycrypto的替代库,可以满足正常使 ...

  6. linux编译安装jpeg,Linux下JPEG库安装脚本(转)

    Linux下JPEG库安装脚本(转)[@more@]该脚本用于在Linux下安装JPEG库,在安装GD库的时候如果没有JPEG库,GD将不能生成JPEG格式的图象. 作者: 何志强#----where ...

  7. python3.6爬虫环境安装要多少内存_Python3爬虫环境配置——解析库安装(附tesserocr安装方法)...

    Python3爬虫环境配置--解析库安装(附tesserocr安装方法) 抓取网页代码后,第二步就是提取信息,为了方便程序设计,这里不采用繁琐的正则提取,利用社区里强大的Python解析库,如lxml ...

  8. R包库安装及数据加载:一次安装多个R包、一次加载多个R包

    R包库安装及数据加载:一次安装多个R包.一次加载多个R包 目录 R包库安装及数据加载 R包安装 一次安装多个R包 加载需要的R包

  9. Ubuntu安装Ceres库-安装依赖时报错:E:无法定位软件包 libcxsparse3.1.2_朱国鑫的博客-CSDN博客

    Ubuntu安装Ceres库-安装依赖时报错:E:无法定位软件包 libcxsparse3.1.2_朱国鑫的博客-CSDN博客

最新文章

  1. 高级转录组分析和R数据可视化第11期(报名线上课还可免费参加线下课2020.6)
  2. python定时器每月执行一次_python 定时器,实现每天凌晨3点执行的方法
  3. iOS开发使用半透明模糊效果方法整理
  4. Spring Boot 2.0(四):使用 Docker 部署 Spring Boot
  5. ACL 2021|CHASE: 首个跨领域多轮Text2SQL中文数据集
  6. scanf的拓展用法——匹配特定字符
  7. Container View Controller
  8. 基于属性加密的ABE算法的应用场景思考展望
  9. OpenCV中的函数子
  10. java 类 属性数量_跟我学java编程—Java类的属性与成员变量
  11. 远程服务器登入信息,远程登录服务器查看信息
  12. Python中直接查看对象值和使用print()输出的区别
  13. indesign怎么查找拼音_indesign拼音插件下载-Indesign拼音排版 免费版 - 河东下载站...
  14. 论文查重系统原理是什么?
  15. 计算机辅助地理教学的内容,信息技术辅助地理教学
  16. mysql 按拼音码查询,MySQL拼音首字母查询
  17. 全网最详细的Python+Requests接口测试教程:Fiddler抓包工具
  18. 最新苹果服务器认证,Sign in with Apple-苹果登录(客户端和服务端)
  19. airpak模拟案例,Airpak模拟教程-体育馆通风模拟案例-CFD数值模拟教程airpak
  20. 灵遁者:一个人的伟大就在于他无畏于强大,并勇敢地站在正确的方向上

热门文章

  1. 单节锂电池充放电及外部供电自动切换的电路--原理介绍
  2. 基于java\JSP/SSM计算机散件报价系统
  3. 全球顶尖大学,获单笔捐赠20.65亿!
  4. JAVA 百度地图 API
  5. pdf怎么进行翻译?我来教你几招
  6. TCP 长连接与短连接
  7. object标签与embad掉钱_OBJECT和EMBED标签
  8. 西安交通大学csharp题库+答案(第四周)
  9. 电脑风扇Macs Fan Control Pro
  10. CAS:2374782-03-1,NOTA-FAPI-4化学试剂供应