首页 > 数据库 > > mac安装mongodb一路趟坑😢
从来没想到有一天会在mac上装环境装了2天,坑在了mongodb上,一路照着菜鸟教程从官网下载安装,结果改变环境变量那步直接蒙蔽,不知道咋操作
export PATH=/usr/local/mongodb/bin:$PATH其实我现在也不知道咋搞,但是接下来就是一路坎坷,反正也解决不明白了
照着后面启动mongod的命令运行,却得到了一个Connection refused报错
Error: couldn't connect to server 127.0.0.1:27017,
connection attempt failed: SocketException:
Error connecting to 127.0.0.1:27017 :: caused by :: Connection refused :嗯,还是不懂,问了后台小伙伴,说服务器没起来,嗯,不懂
那就换个方法吧,不是还有brew安装么
然后还是一路坑!!!!
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.解决:更新brew
brew updateThe following directories are not writable by your user:
/usr/local/sbin
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/sbin
And make sure that your user has write permission.
chmod u+w /usr/local/sbin
解决:授权后输入密码
sudo chown -R $(whoami) /usr/local/sbinYour Xcode (10.1) is too outdated.
Please update to Xcode 10.2.1 (or delete it).
Xcode can be updated from the App Store.解决:简单点,成年人的世界简单点,直接应用程序里删除,重新安装
xcode-select --installAn unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
Permission denied @ dir_s_mkdir - /usr/local/Frameworks解决
sudo chown -R $(whoami) $(brew --prefix)/*
sudo install -d -o $(whoami) -g admin /usr/local/Frameworks最后的最后安装成功了,一度想放弃了,最后找到了报错4的解决方案,果然XX大法好啊
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31537575/viewspace-3169455/ ,如需转载,请注明出处,否则将追究法律责任。