hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
668 stars 735 forks source link

Libsodium Install #1007

Closed andrewBSTan closed 6 years ago

andrewBSTan commented 6 years ago

Dear Community,

Need some help here. I was following through the steps under "Setup Indy SDK build environment for MacOS" and ran into some issues with Libsodium.

Environment : Mac OS High Sierra Version 10.13.5 Rustc version : 1.27.2

Log as follows: ######################################################################## 100.0% Warning: libsodium 1.0.16 is available and more recent than version 1.0.12. ==> Downloading https://github.com/jedisct1/libsodium/releases/download/1.0.12/l Already downloaded: /Users/andrewtan/Library/Caches/Homebrew/libsodium-1.0.12.tar.gz ==> ./configure --prefix=/usr/local/Cellar/libsodium/1.0.12 ==> make check ==> make install Error: The brew link step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink include/sodium /usr/local/include is not writable.

You can try again using: brew link libsodium ==> Summary 🍺 /usr/local/Cellar/libsodium/1.0.12: 68 files, 1.2MB, built in 3 minutes 29 seconds Andrews-Air:~ andrewtan$ brew link libsodium Linking /usr/local/Cellar/libsodium/1.0.12... Error: Could not symlink include/sodium /usr/local/include is not writable.

Any idea what went wrong?

Any guidance is much appreciated.

Thanks.

Andrew

jovfer commented 6 years ago

/usr/local/include is not writable.

Insufficient permission for brew link libsodium. Check that current user has write access to appropriate directories or run as sudo

andrewBSTan commented 6 years ago

@jovfer I am already in Admin mode but still facing this issue.

Have tried the other method "sudo" as well before but also having error. See below error message.

Andrews-Air:~ andrewtan$ sudo brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/65effd2b617bade68a8a2c5b39e1c3089cc0e945/Formula/libsodium.rb Password: Sorry, try again. Password: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system.

andrewBSTan commented 6 years ago

@jovfer Have managed to work around. Not sure how the guide can be updated though. The steps that I've taken to successfully compile in Mac OS as follows:

  1. Uninstall Home Brew ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

  2. Install HomeBrew again ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  3. Change the rights sudo chown -R $(whoami) $(brew --prefix)/*

  4. Follow through the other steps stated under https://github.com/hyperledger/indy-sdk/blob/master/doc/mac-build.md