ubuntu qt 环境变量配置

ubuntu设置qt环境变量


qt 安装路径为:/home/ljn/Qt5.12

包含bin等目录的路经:/home/ljn/Qt5.14.2/5.14.2/gcc_64

环境变量配置

打开配置文件:

sudo gedit /etc/profile

在底部添加:

export PATH="/home/ljn/Qt5.14.2/Tools/QtCreator/bin:$PATH"
export PATH="/home/ljn/Qt5.14.2/5.14.2/gcc_64/bin:$PATH"
export LD_LIBRARY_PATH="/home/ljn/Qt5.14.2/5.14.2/gcc_64/lib:$LD_LIBRARY_PATH"
export QT_PLUGIN_PATH="/home/ljn/Qt5.14.2/5.14.2/gcc_64/plugins:$QT_PLUGIN_PATH"
export QML2_IMPORT_PATH="/home/ljn/Qt5.14.2/5.14.2/gcc_64/qml:$QML2_IMPORT_PATH"

使修改生效:

sudo source /etc/profile
# 或者
source /etc/profile

输入qmake -v 验证:

你可能感兴趣的:(QT/C++进阶之路,ubuntu,qt)