Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

When I installed and compiled on the Mac, an error occurredEnter title here #506

Open
Jzow opened this issue May 21, 2022 · 3 comments
Open
Labels
bug Something isn't working

Comments

@Jzow
Copy link

Jzow commented May 21, 2022

error:

  cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
  run pkg_config fail: "Could not run `\"pkg-config\" \"--libs\" \"--cflags\" \"openssl\"`\nThe pkg-config command could not be found.\n\nMost likely, you need to install a pkg-config package for your OS.\nTry `brew install pkg-config` if you have Homebrew.\n\nIf you've already installed it, ensure the pkg-config command is one of the\ndirectories in the PATH environment variable.\n\nIf you did not expect this build to link to a pre-installed system library,\nthen check documentation of the openssl-sys crate for an option to\nbuild the library from source, or disable features or dependencies\nthat require pkg-config."

  --- 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-apple-darwin
  $TARGET = x86_64-apple-darwin
  openssl-sys = 0.9.73

  ', /Users/jameszow/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.9.73/build/find_normal.rs:191:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed

This should be caused by not installing SSL. What I want to ask is how to configure and install SSL on the Mac and run the IPFs service

@Jzow Jzow added the bug Something isn't working label May 21, 2022
@dariusc93
Copy link

You would have to install openssl on your mac if you have not done so already. This can be done via brew (eg brew install openssl) although i think the only crate that utilize openssl would be ipfs-http.

@koivunej
Copy link
Collaborator

only crate that utilize openssl would be ipfs-http.

That's correct, libp2p does RSA with ring last time I looked. However please do not cargo install ipfs-http even if you set up all of the dependencies, if you want to use ipfs go with the original go-ipfs instead.

@Jzow
Copy link
Author

Jzow commented Jun 12, 2022

only crate that utilize openssl would be ipfs-http.

I understand. I have installed OpenSSL for my system. Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants