Quantcast
Channel: Qt DevNet forums: Installation and Deployment
Viewing all articles
Browse latest Browse all 2113

Shared Libraries and Installation Framework

$
0
0
Hi, So I’m trying to use the Qt IFW to make an installer for Linux. I have all the shared libraries (libQtCore.so, etc) packaged with my application, however I’m having troubles loading them. Apparently Ubuntu has made it so that the LD_LIBRARY_PATH environment variable isn’t used anymore, and instead, you have to add your lib directory to /etc/ld.so.conf. This is where my problem is. In my installation script, I have the following function connected to the installer’s “installationFinished”. installLibs = function() {         if (!component.installed)                 return;         component.addOperation( "AppendFile",                 "/etc/ld.so.conf.d/iubble.conf",                 "@TargetDir@/libs"         );           component.addOperation( "Execute",                 "ldconfig"         ); } This should work, but the problem is that I don’t think it’s being executed as root. I tried each step on the installer manually with sudo ./installer --runoperation "AppendFile" "/etc/ld.so.conf.d/my_program.conf" "/example/libs" And that works, so I think it’s a permissions issue. In fact, when I run the installer and point it to /etc/local as the install directory, it creates the gksudo popup to get permissions, but it still doesn’t create or append the file. Can anyone think of a way to get this executed as root?

Viewing all articles
Browse latest Browse all 2113

Trending Articles