Ubuntu Qmakeは実行ファイルではありません。

Ubuntu Qmakeは実行ファイルではありません。

UbuntuにQtCreatorの新しいバージョンをインストールした後

tux-world@alachiq:~ > sudo apt-get install qt5-qmake build-essential g++ gcc
   Reading package lists... Done
   Building dependency tree       
   Reading state information... Done
   build-essential is already the newest version.
   g++ is already the newest version.
   g++ set to manually installed.
   gcc is already the newest version.
   qt5-qmake is already the newest version.
   0 upgraded, 0 newly installed, 0 to remove and 247 not upgraded.

オプションでBuild & Runqmakeを選択すると、/usr/bin/qmake次のエラーが発生します。

The qmake executable /usr/lib/i386-linux-gnu/qt4/bin/qmake could not be added: qmake '/usr/lib/i386-linux-gnu/qt4/bin/qmake' is not an executable.

私のホームシステムでは、このパッケージをインストールしてオプションでQmakeを設定した後に問題はありません。

その他の情報:

tux-world@alachiq:~ > apt-cache search qt5-qmake
qt5-qmake - Qt 5 qmake Makefile generator tool

tux-world@alachiq:~ > ldd /opt/qtForArm/bin/qmake 
     ldd: /opt/qtForArm/bin/qmake: No such file or directory

tux-world@alachiq:~ > sudo chmod +x /usr/lib/i386-linux-gnu/qt4/bin/qmake
[sudo] password for tux-world: 
chmod: cannot access ‘/usr/lib/i386-linux-gnu/qt4/bin/qmake’: No such file or directory

修正する:

tux-world@alachiq:~ > apt-cache policy qt5-qmake
qt5-qmake:
  Installed: 5.2.1+dfsg-1ubuntu14.2
  Candidate: 5.2.1+dfsg-1ubuntu14.2
  Version table:
 *** 5.2.1+dfsg-1ubuntu14.2 0
        500 http://archive.ubuntu.com/ubuntu/ trusty-updates/main i386 Packages
        100 /var/lib/dpkg/status
     5.2.1+dfsg-1ubuntu14 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages



tux-world@alachiq:~ > ls -a -l /usr/bin/qmake 
lrwxrwxrwx 1 root root 9 فوریه 19 15:53 /usr/bin/qmake -> qtchooser



tux-world@alachiq:~ > qtchooser 
Usage:
  qtchooser { -l | -list-versions | -print-env }
  qtchooser -run-tool=<tool name> [-qt=<Qt version>] [program arguments]
  <executable name> [-qt=<Qt version>] [program arguments]

Environment variables accepted:
 QTCHOOSER_RUNTOOL  name of the tool to be run (same as the -run-tool argument)
 QT_SELECT          version of Qt to be run (same as the -qt argument)

tux-world@alachiq:~ > 

ベストアンサー1

qt5-qmakeがインストールされていますが、Qt CreatorはQt4バージョンのqmakeを探しています。 qt4-qmakeをインストールするか、Qt CreatorにQt5 qmake実行可能ファイルを追加できます(ツール - >オプション - >ビルドと実行 - > Qtバージョン)。

/質問更新後に編集:

Qt Chooserは、設定および/または環境変数に基づいて正しいQtバイナリを自動的に選択するツールです。

Qt 5 qmakeを使用するには、パッケージをインストールするだけですqt5-default。これにより、/usr/bin/qmakeQt Chooser(Qt Chooserなど)によって提供されるさまざまなバイナリがQt 5インストールを指します。 Qt 4 qmakeを使用するには、それをインストールする必要がありますqt4-default。 Qt 4の場合でも同じことを行います。

おすすめ記事