爬虫工具安装问题

1.Failed to install Homebrew Portable Ruby (and your system version is too old)! 报错

解决方案:rm -rf /Users/*/Library/Caches/Homebrew/portable-ruby-2.6.3_2.yosemite.bottle.tar.gz
修改homebrew-cask镜像(替换为中科大镜像源)
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

2.Error: No available formula with the name ‘mongodb'
根据 homebrew-brew 官方的解释得知,MongoDB 不再是开源的了,并且已经从 Homebrew中移除。因此不可使用brew install mongodb这种旧的方式
解决方案:
brew install mongodb
brew install mongodb-community
这是安装的社区版的。如果需要安装指定版本的,可以带上 @版本号
brew install mongodb-community@4.2
参考链接:
https://www.jb51.net/article/179749.htm

3.Unable to locate an executable at "/Library/Java/JavaVirtualMachines/jdk-16.0.1.jdk/Contents/Home/bin/jjs" (-1) ')
通过命令 print(execjs.get().name) 查看js引擎为Nashorn
os.environ["EXECJS_RUNTIME"] = "node" 修改引擎为node

原文地址:https://www.cnblogs.com/tingshu/p/15381341.html