linux编译openssl报错,cargo编译musl报错openssl
cargo编译musl报错openssl
背景
生产环境和编译环境的glibc版本不同出现来如下报错
/lib64/libc.so.6: version `GLIBC_x.xx' not found
所以需要使用cargo 跨平台编译x86_64-unknown-linux-musl,而后就报出来openssl相关的错误:
--- stderr
thread 'main' panicked at '
Could not find directory of OpenSSL installation, and this `-sys` crate cannot
proceed without this knowledge. If OpenSSL is installed and this crate had
trouble finding it, you can set the `OPENSSL_DIR` environment variable for the
compilation process.
Make sure you also have the development packages of openssl installed.
For example, `libssl-dev` on Ubuntu or `openssl-devel` on Fedora.
If you're in a situation where you think the directory *should* be found
automatically, please open a bug at https://github.com/sfackler/rust-openssl
and include information about your system as well as this message.
$HOST = x86_64-unknown-linux-gnu
$TARGET = x86_64-unknown-linux-musl
openssl-sys = 0.9.48
原因
上文总结一句话:编译器没找到ssl的dev包,并给出来debian和red-hat的解决方法。但很可惜,我的编译环境是manjaro,没有libssl_dev类似的包
解决
对于debian/ubuntu就是
apt-get install libssl-dev
对于centos/fedora就是
yum install -y openssl-devel
对于Arch/manjaro,在确保安装openssl情况下
export OPENSSL_DIR=/usr
具体过程通过命令找到libssl.so文件路径(这里是/usr/lib/libsso.so)。编译时会连接OPENSSL_DIR/lib/libssl.so。因此这里的OPENSSL_DIR就是/usr了。
linux编译openssl报错,cargo编译musl报错openssl相关推荐
- OpenSSL简介及在Windows、Linux、Mac系统上的编译步骤
OpenSSL介绍:OpenSSL是一个强大的安全套接字层密码库,囊括主要的密码算法.常用的密钥和证书封装管理功能及SSL协议,并提供丰富的应用程序供测试或其它目的使用. SSL是SecureSock ...
- cmake编译安装完成后 执行cmake --version报错 bash: /usr/bin/cmake: 没有那个文件或目录
cmake编译安装完成后 执行cmake --version报错 bash: /usr/bin/cmake: 没有那个文件或目录 cmake 没有那个目录 - 未完代码 - 博客园 因为直接使用cma ...
- 【错误记录】Android Studio 编译报错 ( VirtualApp 编译 NDK 报错 | Error:A problem occurred configuring project ‘: )
文章目录 一.报错信息 二.解决方案 一.报错信息 编译 VirtualApp ( https://github.com/asLody/VirtualApp ) 时 , 弹出如下错误 ; Error: ...
- vue项目dist编译文件部署到服务器:页面空白、F5刷新报错404、403报错、等等bug - 总结篇
文章目录 问题一. vue编译打包dist文件之后部署到线上服务器 ,访问页面却是空白? 问题二.如果不是空白,页面F5之后就又变成空白? 以Nginx服务器为例,(如下图FTP所示) `404报错: ...
- 【问题待解决】自定义控件设计界面报错,编译运行正常
[问题待解决]自定义控件设计界面报错,编译运行正常 参考文章: (1)[问题待解决]自定义控件设计界面报错,编译运行正常 (2)https://www.cnblogs.com/cnDqf/p/4171 ...
- 深度学习自学(十六):caffe-sphereface识别代码编译问题-caffe sudo make test报错
一.caffe-sphereface编译错误 caffe sudo make test报错 sudo make runtest -j33 CXX src/caffe/test/test_benchma ...
- libcurl linux 静态链接库_Linux ubuntu OpenSSL + curl 静态库编译及使用
下载源码 源码编译 解压之后,进入源码目录openssl-1.1.0f,执行如下命令.因为只需要编译静态库,也没有特殊要求,所以使用的编译选项配置很简单: ./config -fPIC no-shar ...
- Nginx编译安装过程中make编译报错
Nginx编译安装过程中make编译报错 起因 1.-Werror警示报错 解决方法: 2.第二种如下的报错 解决方法: 起因 nginx编译安装过程中,往往一到 make 编译步骤就开始频繁报错,我 ...
- linux系统Nginx下载安装步骤(含报错解决方法)
linux系统Nginx下载安装步骤(含报错解决方法) 基础步骤 安装过程可能出现的报错及解决方法 执行 ./configure --prefix=/opt/nginx 报错 执行 make inst ...
- 【ubuntu(Linux)安装Vs code并配置c++编译及cmake多文件编译】
目录标题 VS code配置c++编译环境 1. Linux系统安装 2. 在Ubuntu中安装VS code 2.1. 首先下载对应系统的VS code安装包 2.2. 安装VS code 3. 在 ...
最新文章
- Python 技术篇-用pytesseract库进行图像识别之环境配置
- Time profile 使用
- 方法重载(overload)和方法重写(override)的比较
- 算法 - 动态规划(0-1背包问题)
- 解决mediawiki上传文件文件名是中文上传失败
- shell 倒数第n列_【零基础学云计算】Shell编程之正则表达式(三)
- 一个准毕业生的2012年总结
- python s append_Python Pandas Series.append()用法及代码示例
- [Python] Ubuntu 16.04 上安装 python3.7 和 pip 并配置虚拟环境
- Boost::Bind 基础
- python判断用户名是否有效_Python校验用户名是否合法示例
- 理解C/C++运行时库
- Jabber服务器部署
- 财务系统服务器ebs系统,ebs系统(ebs财务系统是什么)
- Volatility FAQ
- 使用win10自带录屏软件录制视频
- python程序发钉钉消息
- 教育技术(Educational technology)学习分析和教育数据挖掘领域的SCI、SSCI、CSSCI期刊与会议
- 十进制转化成二进制(C++)
- 华硕电脑黑屏 怎么按都开不了机解决方法
热门文章
- redhat linux 系统修复,简述rhel7系统修复
- python爬虫笔记(1)
- 人生如逆旅,我亦是行人。—第五天
- 【Python实例学习】用Python的xlsxwriter模块,进行Excel表格插入图标的操作
- conda 配置R虚拟环境并安装 monocle 包
- CSS backdrop-filter 实现毛玻璃效果 无需定位裁剪图片
- backdrop-filter: blur() safari 浏览器 无效 解决
- 京东店铺所有商品API接口(JD整店商品查询API接口)
- hostapd_cli 使用命令
- 三色旗问题中的快排应用