我正在尝试使用npm安装chromedriver并且我在我的公司代理服务器后面。我看到以下错误。
这是我到目前为止所做的
我已将我的代理配置设置为 npm config set proxy http://proxy.na.xxxxx.com:8080 npm config set proxy http://proxy.na.xxxxx.com
我已清除缓存 npm config delete proxy
npm install chromedriver --ignore_ssl
他们都没有帮助
ChromeDriver installation failed Error with http request: { 'cache-control': 'no-cache',
pragma: 'no-cache',
'content-type': 'text/html; charset=utf-8',
'proxy-connection': 'close',
connection: 'close',
'content-length': '727' }
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN minos-carrier@3.1.0 No license field.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\#####\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "chromedriver"
npm ERR! node v6.9.2
npm ERR! npm v4.0.5
npm ERR! code ELIFECYCLE
npm ERR! chromedriver@2.28.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the chromedriver@2.28.0 install script 'node install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the chromedriver package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs chromedriver
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls chromedriver
答案 0 :(得分:2)
试试这个:
cv::Mat real(cv::Mat img)
{
std::vector<cv::Mat> planes(3);
//std::cout << img.size() << std::endl;
//std::cout << img.channels() << std::endl;
//planes.resize(img.channels()+1);
cv::split(img, planes); // memory writing problem? Why?
return planes[0];
}
具有http(而不是https)的模块特定cdnurl选项(chromedriver-cdnurl)将解决某些公司代理环境中的受损ca认证检查问题。
答案 1 :(得分:1)
我通过下载二进制文件并将其指向chromedriver
来解决chromedriver
无法通过代理连接的问题。例如:
curl https://chromedriver.storage.googleapis.com/2.46/chromedriver_win32.zip > x:\chromedriver.zip
npm install chromedriver@2.46 --chromedriver_filepath=x:\chromedriver_win32.zip