今天上班时跑代码时突然遇到这个报错,记录一下。
报错:
类似于这个 “chromedriver” cannot be opened because the developer cannot be verified. Unable to launch the chrome browser on Mac OS,但是我的报错还提示了我需要更新chromedriver的版本,当前最新的是89,我当时用的是87。
debug 用时
1hr(主要是macOS升级占时间比较多)
debug 过程
-
重启
-
下载最新版本的chromedriver( chromedriver.chromium.org/ )
-
重启,后重跑代码
-
检查chromedriver路径( timonweb.com/misc/fixing… )
-
更新macOS
-
调整mac的一些设置。具体步骤如下 :
- 1 )打开 "System Preferences"
- 2 )打开 "Security & Privacy",点"General"
- 3 )点击左下角 锁 图标, 解锁
- 4 )点击"Allow apps downloaded from:" 旁边的 "Anywhere", 点击左下角 锁 图标, 上锁。
- 5)完成,可以测试程序。
(来源: stackoverflow.com/questions/2… )
7.程序跑通。