macOS High SierraでSolidity関連のソフトをインストールをしたときのエラー対処

# Populusをインストールするとき

[こちら](http://populus.readthedocs.io/en/latest/quickstart.html)の通り進めていて、このようなエラーが出たときに、

```
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c src/scrypt.c -o build/temp.macosx-10.12-x86_64-3.6/src/scrypt.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/lib/crypto/crypto_scrypt_smix_sse2.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/lib/crypto/crypto_scrypt_smix_sse2.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/lib/crypto/crypto_scrypt_smix.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/lib/crypto/crypto_scrypt_smix.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/lib/crypto/crypto_scrypt.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/lib/crypto/crypto_scrypt.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/lib/scryptenc/scryptenc.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/lib/scryptenc/scryptenc.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/lib/scryptenc/scryptenc_cpuperf.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/lib/scryptenc/scryptenc_cpuperf.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/lib/util/memlimit.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/lib/util/memlimit.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/libcperciva/alg/sha256.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/libcperciva/alg/sha256.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/libcperciva/crypto/crypto_aes_aesni.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/libcperciva/crypto/crypto_aes_aesni.o
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_CONFIG_H -DHAVE_SYSCTL_HW_USERMEM=1 -Iscrypt-1.2.0 -Iscrypt-1.2.0/lib -Iscrypt-1.2.0/lib/scryptenc -Iscrypt-1.2.0/lib/crypto -Iscrypt-1.2.0/lib/util -Iscrypt-1.2.0/libcperciva/cpusupport -Iscrypt-1.2.0/libcperciva/alg -Iscrypt-1.2.0/libcperciva/util -Iscrypt-1.2.0/libcperciva/crypto -I/Users/hidehiro/.pyenv/versions/3.6.2/include/python3.6m -c scrypt-1.2.0/libcperciva/crypto/crypto_aes.c -o build/temp.macosx-10.12-x86_64-3.6/scrypt-1.2.0/libcperciva/crypto/crypto_aes.o
    scrypt-1.2.0/libcperciva/crypto/crypto_aes.c:6:10: fatal error: 'openssl/aes.h' file not found
    #include <openssl/aes.h>
             ^~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    
    ----------------------------------------
```

[こちら](https://github.com/pyca/cryptography/issues/2350)などで出て来る`env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography`ではダメで、[こちら](https://stackoverflow.com/questions/45693149/openssl-aes-h-file-not-found-on-mac)の

```
$ cd /usr/local/include
$ ln -s ../opt/openssl/include/openssl
```

がうまく行った。
[これ](https://stackoverflow.com/questions/35021501/pip-install-openssl-aes-h-error-and-libxml-xmlversion-h-error-osx)も使えるかもしれない。


# solc (Solidityコンパイラ)をインストールするとき
[ここ](https://book.ethereum-jp.net/first_use/contract.html)などにある`brew install solidity`は動かず、[ここ](http://block-chain.jp/tech/install-solidity-solc-on-mac/)や[ここ](http://solidity.readthedocs.io/en/develop/installing-solidity.html)にあるような方法でソースからビルドすることが必要だった。
追記： `brew tap ethereum/ethereum`をすれば `brew install solidity`でいけるらしい