CentOS7 安装 mycli 出现的问题

由于 mycli 依赖于 cryptography,而后者需要 openssl 1.1.0 或 1.1.1 (参见 https://cryptography.io/en/latest/installation.html),而 CentOS7 默认使用 yum 安装的 openssl 是 1.0.x,所以不能成功安装 cryptography,进而不能成功安装 mycli。解决如下,

https://www.openssl.org/source/old/1.1.0/ 下载 openssl-1.1.0l.tar.gz,解压缩直接安装,(注意,这里把 openssl 安装到默认路径,即头文件在 /usr/local/include,库文件在 /usr/local/lib。如果不在标准路径,安装 cryptography 时可能找不到头文件)

$ ./config
$ make
$ sudo make install

再安装 cryptography,

$ sudo pip3 install -i https://pypi.douban.com/simple cryptography

再安装 mycli,

$ sudo pip3 install -i https://pypi.douban.com/simple/ mycli

(完)

原文地址:https://www.cnblogs.com/gaowengang/p/14419546.html