In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article focuses on "cargo compilation musl error openssl how to do", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn "cargo compilation musl error openssl how to do" it!
Cargo compilation musl error openssl background
Different glibc versions of the production environment and the compiled environment appear to report errors as follows
/ lib64/libc.so.6: version `GLIBC_x.xx' not found
So you need to use cargo to compile x86_64-unknown-linux-musl across platforms, and then report openssl-related errors:
-stderrthread 'main' panicked at' Could not find directory of OpenSSL installation, and this `- sys` crate cannotproceed without this knowledge. If OpenSSL is installed and this crate hadtrouble finding it, you can set the `OPENSSL_ DIR` environment variable for thecompilation 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 foundautomatically, please open a bug at https://github.com/sfackler/rust-openssland include information about your system as well as this message.$HOST = x86_64-unknown-linux-gnu$TARGET = x86_64-unknown-linux-muslopenssl-sys = 0.9.48reasons
To sum up, the compiler did not find the dev package for ssl and gave solutions to debian and red-hat. Unfortunately, my compilation environment is manjaro, and there is no package like libssl_dev.
Solve
For debian/ubuntu, that is
Apt-get install libssl-dev
For centos/fedora, that is
Yum install-y openssl-devel
For Arch/manjaro, if you ensure that openssl is installed
Export OPENSSL_DIR=/usr
The specific process is to find the path to the libssl.so file (/ usr/lib/libsso.so in this case) through the command. OPENSSL_DIR/lib/libssl.so is connected at compile time. So the OPENSSL_DIR here is / usr.
At this point, I believe that everyone on the "cargo compilation musl error openssl how to do" have a deeper understanding, might as well to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.