首页 > 解决方案 > 出现错误: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

标签: node.jsselenium-webdrivermocha.jsselenium-chromedrivernode-modules

解决方案


这个在 Ubuntu 20.04 上对我有用

sudo npm -g install chromedriver --unsafe-perm=true --allow-root

推荐阅读