E
E
enrike2015-05-14 05:04:46
MySQL
enrike, 2015-05-14 05:04:46

How to properly configure MySQL for Qt on Ubuntu?

Hello,
I want to set up MySQL on Ubuntu (x64) for Qt 5.4, but the following problem arises:

[email protected]:/opt/Qt/5.4/Src/qtbase/src/plugins/sqldrivers/mysql$ /opt/Qt/5.4/gcc_64/bin/qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=-L/usr/lib/x86_64-linux-gnu -lmysqlclient_r" mysql.pro
/opt/Qt/5.4/Src/qtbase/mkspecs/features/qt_plugin.prf:50: Cannot write file /opt/Qt/5.4/Src/qtbase/mkspecs/modules-inst/qt_plugin_qsqlmysql.pri: Cannot create parent directory.
Project ERROR: Aborting.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
EXL, 2015-05-14
@enrike

Probably the problem is that by default the user does not have the right to write any changes to the /opt/ directory either .
I see two solutions:
1. Move the /opt/Qt/5.4/Src/ directory somewhere where the user of your system has write access. For example in /home/your_nickname/Qt/Src/ .
2. Run the command as superuser (you will need to know the root password):
Choose the most suitable way. Good luck!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question