QtCreator启动时 dbus-1的错误解决方法

Qt 5.12.0,QtCreator4.8.0启动时提示dbus-1的错误解决方法

...version LIBDBUS_1_3 not defined in file libdbus-1.so.3...

需要更新dbus

1.打开https://dbus.freedesktop.org/releases/dbus/
2.下载dbus-1.13.6.tar.gz
3.linux终端

$tar -zxvf dbus-1.13.6.tar.gz

4.进入dbus-1.13.6文件夹

$./configure

5.失败,说明D-Bus daemon需要expat XML parser 库,所以这里需要先编译expat库

$sudo apt-get install libexpat1-dev

6.重新进行4步骤
7.编译安装dbus

$make
$make install

8.安装完成,更新连接文件

$cp /usr/local/lib/libdbus-1.so.3.24.0 /lib/x86_64-linux-gnu

如果没有x86_64-linux-gnu这个目录,可以拷贝到/lib

$ln -sf /lib/x86_64-linux-gnu/libdbus-1.so.3.24.0 /lib/x86_64-linux-gnu/libdbus-1.so.3

9.再次启动QtCreator4.8.0,提示

dbus[17254]: D-Bus library appears to be incorrectly set up: see the manual page for dbus-uuidgen to correct this issue. (Failed to open "/usr/local/var/lib/dbus/machine-id": No such file or directory; Failed to open "/etc/machine-id": No such file or directory)
  D-Bus not built with -rdynamic so unable to print a backtrace
Aborted (core dumped)

缺少machine-id文件,需要给它定义一个id,使用dbus-uuidgen创建id文件

$sudo dbus-uuidgen > /etc/machine-id

10.再次启动QtCreator4.8.0成功

你可能感兴趣的:(qt)