Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenSSL library not found #855

Closed
SLASHLogin opened this issue Feb 28, 2018 · 15 comments
Closed

OpenSSL library not found #855

SLASHLogin opened this issue Feb 28, 2018 · 15 comments

Comments

@SLASHLogin
Copy link

SLASHLogin commented Feb 28, 2018

error:

 failed to run custom build command for `openssl-sys v0.9.24`
process didn't exit successfully: `C:\Users\przem\Desktop\Pliki\rust\clouder\target\debug\build\openssl-sys-37a83c20c1c3f413\build-script-build` (exit code: 101)
--- stdout
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=OPENSSL_LIB_DIR
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=OPENSSL_INCLUDE_DIR
cargo:rerun-if-env-changed=X86_64_PC_WINDOWS_MSVC_OPENSSL_DIR
cargo:rerun-if-env-changed=OPENSSL_DIR
note: vcpkg did not find openssl as libcrypto and libssl : VcpkgNotFound("No vcpkg.user.targets found. Set the VCPKG_ROOT environment variable or run \'vcpkg integrate install\'")
note: vcpkg did not find openssl as ssleay32 and libeay32: VcpkgNotFound("No vcpkg.user.targets found. Set the VCPKG_ROOT environment variable or run \'vcpkg integrate install\'")

--- 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.

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-pc-windows-msvc
    $TARGET = x86_64-pc-windows-msvc
    openssl-sys = 0.9.24


It looks like you're compiling for MSVC but we couldn't detect an OpenSSL
installation. If there isn't one installed then you can try the rust-openssl
README for more information about how to download precompiled binaries of
OpenSSL:

    https://github.com/sfackler/rust-openssl#windows

', C:\Users\przem\.cargo\registry\src\github.com-1ecc6299db9ec823\openssl-sys-0.9.24\build.rs:210:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.

warning: build failed, waiting for other jobs to finish...
error: build failed

The environment:

OPENSSL_DIR = C:\OpenSSL-Win64
OPENSSL_CONF = C:\Program Files (x86)\OpenSSL-Win32\bin\openssl.cfg
@sfackler
Copy link
Owner

What is inside of C:\OpenSSL-Win64\include?

@SLASHLogin
Copy link
Author

C:\OpenSSL-Win64\include\openssl - header files of c lang

@sfackler
Copy link
Owner

That message is only printed if OPENSSL_DIR isn't set - are you sure it's configured properly to be visible to Cargo and rustc?

@SLASHLogin
Copy link
Author

It went properly when run with higher permission. Thank you!

@tylerlaberge
Copy link

If anyone is still running into this issue (like I was), I was able to resolve it just by updating/upgrading

sudo apt-get update
sudo apt-get upgrade

## attempt to build again

@zodiake
Copy link

zodiake commented Dec 27, 2018

https://docs.rs/openssl/0.10.16/openssl/

macOS
$ brew install openssl@1.1

Arch Linux
$ sudo pacman -S pkg-config openssl

Debian and Ubuntu
$ sudo apt-get install pkg-config libssl-dev

Fedora
$ sudo dnf install pkg-config openssl-devel

@steelx
Copy link

steelx commented Aug 27, 2020

@zodiake thanks :)
$ sudo apt-get install pkg-config libssl-dev worked.

@yuanmomo
Copy link

@zodiake

Thanks.

$ sudo apt-get install pkg-config libssl-dev

this worked for me as well.

@bachetesla
Copy link

@zodiake Thanks :)

@Oskii
Copy link

Oskii commented May 31, 2022

I can't seem to install libssl-dev - any ideas?

Need to get 2906 kB of archives.
After this operation, 8010 kB of additional disk space will be used.
Err:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libssl1.1 amd64 1.1.1f-1ubuntu2.10
  404  Not Found [IP: 91.189.91.38 80]
Err:2 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libssl-dev amd64 1.1.1f-1ubuntu2.10
  404  Not Found [IP: 91.189.91.38 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.10_amd64.deb  404  Not Found [IP: 91.189.91.38 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1f-1ubuntu2.10_amd64.deb  404  Not Found [IP: 91.189.91.38 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?```

@fengbenming
Copy link

If anyone is still running into this issue (like I was), I was able to resolve it just by updating/upgrading

sudo apt-get update
sudo apt-get upgrade

## attempt to build again

It is really work, you can upgrade openssl can sovle problems. Why so many downs ?

@yourmoonlight
Copy link

If anyone is still running into this issue (like I was), I was able to resolve it just by updating/upgrading

sudo apt-get update
sudo apt-get upgrade

## attempt to build again

It is really work, you can upgrade openssl can sovle problems. Why so many downs ?

cause it it not work

@Altar12
Copy link

Altar12 commented Oct 4, 2022

Thanks a lot @zodiake. Worked perfectly after executing the command specified

@lukasdll
Copy link

Because that solution works only on very specific situations, and the vast majority of the people had a different issue. For that solution to work you should already have the required library installed, but installed so long ago that it became outdated and did not work. The majority of the people having this issue had a fresh OS install and the library was not installed, therefore, update and upgrade did not solve the problem.

@sai-kalai
Copy link

Thanks!
sudo apt-get install pkg-config libssl-dev
worked for me on WSL2 Ubuntu22.4LTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

14 participants