错误1:
error while loading shared libraries: libopencv_core.so.410: cannot open shared object file: No such file or directory
sudo gedit /etc/ld.so.conf.d/opencv.conf

保存之后,终端再输入命令
sudo ldconfig -v

然后再重新运行代码尝试
错误2
symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE
可能的缘由是从ubuntu应用中心安装的vscode,而不是vscode官方网站下载安装
解决方法
方案1.继续使用从应用中心安装的vscode
按快捷键ctrl+shift+p,在跳出的输入框中输入Preferences: Open User Settings (JSON)

在settings.json中添加以下代码,并保存,再运行代码(成功)
"terminal.integrated.env.linux": {
"GTK_PATH": null,
"GIO_MODULE_DIR": null,
}
方案2.卸载应用中心安装的vscode,从官方下载vscode安装(这个我没试过)
© 版权声明
文章版权归作者所有,未经允许请勿转载。如内容涉嫌侵权,请在本页底部进入<联系我们>进行举报投诉!
THE END














暂无评论内容