视觉SLAM十四讲2 ch5 imageBasics程序报错

成功编译后运行./imageBasics ../../imageBasics/ubuntu.png 

报错:

图像宽为1200,高为674,通道数为3
Gtk-Message: 22:45:33.215: Failed to load module "gail"
Gtk-Message: 22:45:33.215: Failed to load module "atk-bridge"

(imageBasics:493011): Gtk-WARNING **: 22:45:33.218: 无法在模块路径中找到主题引擎:“adwaita”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.218: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.218: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.218: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.218: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.218: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:493011): Gtk-WARNING **: 22:45:33.219: 无法在模块路径中找到主题引擎:“adwaita”,
./imageBasics: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE

由“图像宽为1200,高为674,通道数为3”看出程序成功读入图像,但在运行cv::imshow()函数时出错。

我先根据报错前两行Gtk-Message: 22:45:33.215: Failed to load module "gail"上网查了,几乎都是再安装子模块,没有奏效。

再查报错最后一行:./imageBasics: symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE

根据链接:[bug] : symbol lookup error: /snap/core20/current/lib/x86_64-linux-gnu/libpthread.so.0: undefined symbol: __libc_pthread_init, version GLIBC_PRIVATE · Issue #1406 · ros2/ros2 · GitHub(该链接展示了不同场景的相同错误,据评论推测可能是vscode终端存在问题,但我暂未测试)仅尝试了在vscode终端中运行:

unset GTK_PATH

再次运行程序,图片终于显示出来:

但仍然输出一系列警告:

Gtk-Message: 00:24:08.576: Failed to load module "gail"
Gtk-Message: 00:24:08.576: Failed to load module "atk-bridge"

(imageBasics:581435): Gtk-WARNING **: 00:24:08.582: 无法在模块路径中找到主题引擎:“adwaita”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.582: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.583: 无法在模块路径中找到主题引擎:“pixmap”,

(imageBasics:581435): Gtk-WARNING **: 00:24:08.584: 无法在模块路径中找到主题引擎:“adwaita”,
Gtk-Message: 00:24:08.584: Failed to load module "canberra-gtk-module"

关闭图片窗口,终端输出:

遍历图像用时:2.19e-07 秒。

程序结束。

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值