chromedriver下载链接:
https://chromedriver.chromium.org/downloads
1.首先对chrome进行安装,安装方式使用指令一般会遇上下载不了的情况,所以直接在windows端下载好安装包,进而拉取到ubuntu服务器端。
这里先留点儿,后面再补充
2.关于因为要使用到selenium,要用到chromedriver驱动浏览器,所以要去下载对应的版本,但是有一点非常重要,那就是放置的位置,需要放在/usr/local/bin/chromedriver
否则会出现找不到文件的情况(放在这个地方貌似也直接解决了环境配置的问题)
参考链接:

3.程序运行的时候找得到chromedriver的位置了,但是相继又出现了权限的问题,使用
sudu chmod +x chromedriver

4.ubuntu中打开浏览器会出现网页中的中文显示为方框

?
? 
?输入命令:
sudo chmod 755 /usr/share/fonts/truetype/*
sudo fc-cache -fv

?
参考连接1:https://blog.csdn.net/czg13548930186/article/details/82994594?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-1.pc_relevant_default&spm=1001.2101.3001.4242.2&utm_relevant_index=4 参考链接2:https://blog.csdn.net/zapperstab/article/details/18602969?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0.pc_relevant_default&spm=1001.2101.3001.4242.1&utm_relevant_index=3?
|