fatal error: openssl/opensslv.h: No such file or directory

本文解决了在使用pip3安装pymysql时遇到的“fatal error:openssl/opensslv.h:No such file or directory”和“ffi.h:No such file or directory”的错误。提供了在Debian、Ubuntu、Fedora、CentOS或RHEL等Linux发行版中通过安装libssl-dev和libffi-dev来修复这些问题的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

pip3安装pymysql过程中遇到的错误:

报错:

fatal error: openssl/opensslv.h: No such file or directory

解决办法:

sudo apt-get install libssl-dev

yum install libssl-dev


报错:

fatal error: ffi.h: No such file or directory

解决办法:

sudo apt-get install libffi-dev

yum install libffi-dev

 



 

Linux内核编译时出现fatal error: openssl/opensslv.h: No such file or directory错误的解决办法

 

参考:

1、https://stackoverflow.com/questions/46008624/how-to-fix-fatal-error-openssl-opensslv-h-no-such-file-or-directory-in-redhat

2、http://ask.xmodulo.com/fix-fatal-error-openssl.html

fatal error: openssl/opensslv.h: No such file or directory

If you encounter this error during compilation, this is because of the following: The program you are trying to build is using OpenSSL, but necessary development files (libraries and header files) required to link with OpenSSL are missing on your Linux platform.

To fix this problem, you have to install OpenSSL development package, which is available in standard repositories of all modern Linux distributions.

To install OpenSSL development package on Debian, Ubuntu or their derivatives:

$ sudo apt-get install libssl-dev 

To install OpenSSL development package on Fedora, CentOS or RHEL:

$ sudo yum install openssl-devel 

After installing the package, try recompiling the program

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值