PDA

View Full Version : SQL in Centos and Ubuntu



Lycus HackerEmo
5th January 2010, 09:26
help me with this problem user that has the following problem.

Hello, install the same version of QT 4.5.3.
In Centos compile a program that uses postgres and it works. But in ubuntu, no. He says the drivers available but does not throw any. I go to the folder where are the sources of the drivers and compile and install, but the problem remains. They know they can be happening?

Technically, in the compilation of the drivers, none. I generates a

cd /opt/qtsdk/qt/src/plugins/sqldrivers/psql/
/opt/qtsdk/qt/bin/qmake
make
make install

This last command strip these messages:

install -m 755 -p "libqsqlpsql.so" "/opt/qtsdk/qt/plugins/sqldrivers/libqsqlpsql.so"
strip --strip-unneeded "/opt/qtsdk/qt/plugins/sqldrivers/libqsqlpsql.so"

Then when I run my program, I pull these lines:

[root@spool_cabildo mcacontrol]# ./mcacontrol
QSqlDatabase: QPSQL driver not loaded
QSqlDatabase: available drivers:
QSqlQuery::exec: database not open
Segmentation violation

Install it on another Centos 5.3 and I spend the same as Ubuntu. I can not remember that I made for it from going in the first Centos. (Look at the history ... and the qtcreator)
Thank you very much.

qt en espanol (http://qt-espanol.foroactivo.net/programacion-en-qt-f6/sql-en-centos-y-ubuntu-t7.htm)

Lycus HackerEmo
6th January 2010, 00:24
I leave the solution here. only had to add the following:


export QT_PLUGIN_PATH=/opt/qtsdk/qt/plugins

Here is the source (http://www.mail-archive.com/clam-devel@llistes.projectes.lafarga.org/msg03001.html)