Skip to content

Instantly share code, notes, and snippets.

@popowa
Last active May 25, 2020 12:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save popowa/76351a312538917135f5d11378912b49 to your computer and use it in GitHub Desktop.
Save popowa/76351a312538917135f5d11378912b49 to your computer and use it in GitHub Desktop.
KomuroMBA:~ ayakomuro$ mongo
dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/mongo
Reason: image not found
Abort trap: 6
KomuroMBA:~ ayakomuro$ brew search openssl
==> Formulae
curl-openssl openssl@1.1 ✔
glib-openssl homebrew/portable-ruby/portable-openssl
KomuroMBA:~ ayakomuro$ brew install openssl
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 4 taps (homebrew/core, homebrew/services, mongodb/brew and caskroom/cask).
==> New Formulae
dgraph qrcp
==> Updated Formulae
hugo ✔ flake8 monero
balena-cli gdb parallel
benthos idris pmd
btfs jc roswell
contentful-cli mariadb-connector-c subnetcalc
debianutils mas xmrig
==> Updated Casks
dbvisualizer swiftformat-for-xcode understand
raven-reader trojan-qt5
reaper typora
Warning: openssl@1.1 1.1.1g is already installed and up-to-date
To reinstall 1.1.1g, run `brew reinstall openssl@1.1`
KomuroMBA:~ ayakomuro$ brew reinstall openssl@1.1
==> Downloading https://homebrew.bintray.com/bottles/openssl%401.1-1.1.1g.catali
Already downloaded: /Users/ayakomuro/Library/Caches/Homebrew/downloads/d6b7a6d80c588c89e79f350ce3e05c95d31d804291cc120efcbb6c9478607a41--openssl@1.1-1.1.1g.catalina.bottle.tar.gz
==> Reinstalling openssl@1.1
==> Pouring openssl@1.1-1.1.1g.catalina.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/openssl@1.1/certs
and run
/usr/local/opt/openssl@1.1/bin/c_rehash
openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.
If you need to have openssl@1.1 first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> /Users/ayakomuro/.bash_profile
For compilers to find openssl@1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"
For pkg-config to find openssl@1.1 you may need to set:
export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
==> Summary
🍺 /usr/local/Cellar/openssl@1.1/1.1.1g: 8,059 files, 18MB
KomuroMBA:~ ayakomuro$ echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> /Users/ayakomuro/.bash_profile
KomuroMBA:~ ayakomuro$ source ~/.bash_profile
KomuroMBA:~ ayakomuro$ brew switch openssl 1.1.1g
Error: openssl does not have a version "1.1.1g" in the Cellar.
openssl's installed versions: 1.0.2h_1, 1.0.2n
KomuroMBA:~ ayakomuro$ brew switch openssl 1.0.2n
Cleaning /usr/local/Cellar/openssl/1.0.2n
Cleaning /usr/local/Cellar/openssl/1.0.2h_1
Opt link created for /usr/local/Cellar/openssl/1.0.2n
KomuroMBA:~ ayakomuro$ mongo
MongoDB shell version: 3.2.7
connecting to: test
2020-05-25T21:07:28.119+0900 E QUERY [thread1] Error: network error while attempting to run command 'whatsmyuri' on host '127.0.0.1:27017' :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
KomuroMBA:~ ayakomuro$ brew services restart mongodb-community
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
KomuroMBA:~ ayakomuro$ ps aux | grep mongo
ayakomuro 97451 0.1 0.5 5529036 44940 ?? S 9:08PM 0:01.28 /usr/local/opt/mongodb-community/bin/mongod --config /usr/local/etc/mongod.conf
ayakomuro 97495 0.0 0.0 4278524 708 s000 S+ 9:08PM 0:00.01 grep mongo
KomuroMBA:~ ayakomuro$ mongo
MongoDB shell version: 3.2.7
connecting to: test
2020-05-25T21:08:28.266+0900 E QUERY [thread1] Error: network error while attempting to run command 'whatsmyuri' on host '127.0.0.1:27017' :
connect@src/mongo/shell/mongo.js:229:14
@(connect):1:6
exception: connect failed
KomuroMBA:~ ayakomuro$ brew install mongodb/brew/mongodb-community-shell
Updating Homebrew...
==> Installing mongodb-community-shell from mongodb/brew
==> Downloading https://fastdl.mongodb.org/osx/mongodb-shell-macos-x86_64-4.2.0.tgz
######################################################################## 100.0%
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/mongo
Target /usr/local/bin/mongo
is a symlink belonging to mongodb. You can unlink it:
brew unlink mongodb
To force the link and overwrite all conflicting files:
brew link --overwrite mongodb-community-shell
To list all files that would be deleted:
brew link --overwrite --dry-run mongodb-community-shell
Possible conflicting files are:
/usr/local/bin/mongo -> /usr/local/Cellar/mongodb/3.2.7/bin/mongo
==> Summary
🍺 /usr/local/Cellar/mongodb-community-shell/4.2.0: 8 files, 45MB, built in 5 seconds
KomuroMBA:~ ayakomuro$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment