使用Qt时遇到的一些问题以及相关解决办法。
一、“make”问题
问题:
Could not determine which "make" command to run. Check the "make" step in the build configuration.
Error while building/deploying project MarkdownPic (kit: Desktop Qt 5.11.1 GCC 64bit)
When executing step "qmake"
解决方法:
终端运行以下命令
sudo apt install cmake g++ gcc gdb
二、“cannot find -IGL”问题
解决方法:
终端运行以下命令
sudo apt install libgl1-mesa-dev
三、“not found”问题
问题:
usr/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_3' not found
解决方法:
# 先试一下这个
sudo apt-get install libcurl4-openssl-dev
# 不行运行以下两行命令
apt remove -y libcurl4
apt install -y libcurl4 curl
四、编译提示缺少openssl目录下一些问题件
解决方法:
终端运行以下命令
sudo apt install libssl-dev
五、ubuntu下Qt5.4无法输入中文
解决方法:
1、安装fcitx-frontend-qt5:
sudo apt-get install fcitx-frontend-qt5
2、将libfcitxplatforminputcontextplugin.so复制到Qt5.4的开发环境中:
安装fcitx-frontend-qt5后libfcitxplatforminputcontextplugin.so的路径如下:
/usr/lib/i386-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so
将其拷贝到下面两个目录内:
Qt安装目录/Tools/QtCreator/bin/plugins/platforminputcontexts/
Qt安装目录/5.4/gcc/plugins/platforminputcontexts/
3、一般执行完以上两步基本就可以了。(下面这个暂时还未遇到过)
如果还是不行,请在.profile文件内添加以下行:
export XIM_PROGRAM=fcitx
export XIM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"