node.js - 出现错误:chromedriver 安装失败错误 eacces 权限被拒绝 mkdir
问题描述
当我尝试npm install chromedriver --chromedriver-force-download
使用 node js 安装 Chrome 驱动程序时,我收到此错误:chromedriver installation failed error eacces permission denied mkdir
.
我已经申请了完全许可,777
但我仍然收到此错误,谁能帮助我为什么会收到此错误?
我使用了这些命令:
1) npm i chromedriver
2) Force Download : npm install chromedriver --chromedriver-force-download
解决方案
这个在 Ubuntu 20.04 上对我有用
sudo npm -g install chromedriver --unsafe-perm=true --allow-root
推荐阅读
- function - 我应该如何阅读有关递归的代码?
- selenium - Watir:在 Windows 而非 Linux 中使用 headless-chrome 下载
- java - 正则表达式检查小数是否在两个数字之间,而与小数点后的位数无关
- java - 使用 TestNG 框架使用 Selenium 跳过测试用例
- javascript - 如果溢出,HTML 内容到 PDF 不会添加页面 - jsPDF
- c# - 自动淡入淡出场景
- gerrit - 如何使用gerritnoteb,我想查询db中的一些评论记录
- javascript - 如何在javascript中使用json对象删除对象的json数组?
- azure - Azure DevOps Pipeline Hosted Agent - 在哪里可以找到系统功能?
- c++ - Embarcadero C++ Builder 中生成的 DLL 未解决的外部链接错误