qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt5/bin/qmake': No such file or directory

1:@ubuntu:/usr/bin$ ./qmake
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt5/bin/qmake': No such file or directory

2:查看qmake文件,发现qmake指向qtchooser

@ubuntu:/usr/bin$ ls -l qmake
lrwxrwxrwx 1 root root 9 May 9 2016 qmake -> qtchooser

3:打印qtchooser的配置信息

@ubuntu:/usr/bin$ ./qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib/x86_64-linux-gnu/qt5/bin"
QTLIBDIR="/usr/lib/x86_64-linux-gnu"

配置文件指向的地方已经删除了,新的QT在其他目录下,需要修改配置文件

4:查找qtchooser的配置文件

@ubuntu:/usr$ find ./ | grep qtchooser
./share/qtchooser
./share/qtchooser/qt5-x86_64-linux-gnu.conf
./share/qtchooser/qt4-x86_64-linux-gnu.conf
./share/doc/qtchooser
./share/doc/qtchooser/README.Debian
./share/doc/qtchooser/copyright
./share/doc/qtchooser/changelog.Debian.gz
./share/man/man1/qtchooser.1.gz
./share/lintian/overrides/qtchooser
./bin/qtchooser
./lib/x86_64-linux-gnu/qtchooser
./lib/x86_64-linux-gnu/qtchooser/qt5.conf
./lib/x86_64-linux-gnu/qtchooser/4.conf
./lib/x86_64-linux-gnu/qtchooser/qt4.conf
./lib/x86_64-linux-gnu/qtchooser/5.conf
./lib/x86_64-linux-gnu/qtchooser/default.conf
./lib/x86_64-linux-gnu/qt-default/qtchooser
./lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf


5:挨个试,最后发现是这个

@ubuntu:/usr/share/qtchooser$ cat qt5-x86_64-linux-gnu.conf
/usr/lib/x86_64-linux-gnu/qt5/bin
/usr/lib/x86_64-linux-gnu

6:修改这个配置文件,将路径改成目前QT所在的路径
/opt/Qt5.7.1/5.7/gcc_64/bin
/opt/Qt5.7.1/5.7

再运行qmake,好用了!
@ubuntu:/usr/share/qtchooser$ qmake
Usage: /opt/Qt5.7.1/5.7/gcc_64/bin/qmake [mode] [options] [files]
......






评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值