qmake: could not open config file - qt

I'm trying to get Qt running again. I think I screwed a couple of things up by manually deleting the /usr/lib/x86_64-linux-gnu/qt5 folder.
I think I got most of it reinstalled correctly but not I got the following problem.
When I check the qmake version i.e.
qmake --version
I get the following message.
qmake: could not open config file '/usr/lib/x86_64-linux-gnu/qtchooser//default.conf': No such file or directory
I don't understand why there is a second slash in the path. The default.conf file exists in the path without the second slash.
Is there a way to modify the path?
Really appreciate any help.

Related

Why changing LD_LIBRARY_PATH has no effect in Ubuntu?

I was trying to deploy my application on Ubuntu 16.04. So i made a package with the following hierarchy -
Package
|
----bin
|
-----application
-----application.sh
-----Qt
|
-----necessary qt libraries
-----platforms
Here is the application.sh file -
#!/bin/sh
export LD_LIBRARY_PATH=`pwd`/Qt
./application
When i execute the application.sh file, it shows me that it cant find the libQt5MultimediaWidgets.so.5 file. But its in the Qt folder. Also when i print the ldd application from the application.sh file after exporting LD_LIBRARY_PATH it gives me following output -
Please check the marked parts. Can anyone please explain why the libraries from the Qt folder are not found even after exporting the LD_LIBARRY_PATH?
Edit:
So as suggested by #Zang, i have checked the debug log and here it is -
Please check the marked parts.
It seems like its actually trying the actual libQt5MultimediaWidgets.so and then report that its unable to find it. Can anyone please help me understand whats happening here?
Edit-2: As per suggestion from #Tarun, i have ran ls -al on my Qt folder. Here is the output -
All files in Your Qt directory are actually simlinks to non-existing files in the same directory, therefore they cannot be found.
If you look at the output of your ls -al
These are soft links that you have. Your softlink libQt5MultimediaWidgets.so.5 points to libQt5MultimediaWidgets.so.5.9.2 in the same directory and the file is not there at all. So you need to either set the correct softlink path or have the file in same directory
First
Could it be that the pwd is not where you assume it is?
You could try adding
# Figure out where the application.sh script is located
scriptpath="$( cd "$(dirname "$0")" ; pwd -P )"
# Make sure our pwd is that location
cd "$scriptpath"
in the top of your script (assumes bash shell, from here)
By doing this all relative paths to Qt folder will be valid.
Second
Maybe you should considder exporting your new LD_LIBRARY_PATH, like so (from here):
LD_LIBRARY_PATH=whatever
export LD_LIBRARY_PATH
Third
It may be useful to run ldconfig command for ld to update after changing the variable (from here):
sudo ldconfig
The file libQt5MultimediaWidgets.so is not present in /Desktop/package/bin/Qt according to the screenshots shown.

missing .dependencies in user/ when bin/grav

I'm trying to install Grav on Heroku following the learn.getgrav.org docs.
I've got the web app deployed successfully, however it tells me to bin/grav install.
I do that and it gives me the following output:
ERROR Missing .dependencies file in user/ folder
I do not know what to do at this point as it's happened everytime I've installed Grav.
Hope this will be solved.
Sadly this problem is all too common when copying files :(
hidden (dotted) files are not always copied.
.dependencies
.htaccss
using ls -l -a in the folder where you extracted the files originally Dowloads/grav I could see the files that were not copied to fix it
cp .dependencies .htaccss /var/www/grav/
When I install GRAV on my server each time, I always copy the Zip file to the server, unzip it in place, then remove the zip file - using this method I have never had a problem with the installing of GRAV
HTH Rich

Magento2: After delete pub/static folder and making deploy, no css files found

I searched the web, but found no answer that would work:
I use Magento 2 custom theme and when I made changes to .less file, I wanted to compile files, so I deleted pub/static folder and made deploy: php bin/magento setup:static-content:deploy.
After that, no css files are found in pub/static/frontend/<Theme>/default/css.
Also, when I use grunt less, I got errors:
>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-m.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/styles-l.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email.css not written because no source files were found.
>> Destination pub/static/frontend/Magento/blank/en_US/css/email-inline.css not written because no source files were found.
I am in a developer mode.
Does anyone have any solution for this?
Thank you
I had the same issue, when I did grunt refresh I got the same errors.
To resolve this I removed var/di, var/cache, var/generation, var/page_cache and the contents of pub/static folder (be careful not to remove pub/static/.htaccess).
Then I tried: grunt exec:themename
If successful do, grunt clean
If successful do, grunt refresh
And then, setup:static-content:deploy
This worked for me.
You need to retrieve the file .htaccess from the pub/static folder.
I found it here: https://github.com/magento/magento2/blob/develop/pub/static/.htaccess
*Check the version you use of magento

Accidentally deleted status.cgi in my nagios cgi folder

Can anyone tell me how to recreate my status.cgi file for nagios. I have a status.dat file that supposedly it is created from. Bonus points if you can tell me how to make a status-json.cgi file also.
I have downloaded the status.c file from nagios 3.5.0 and also the Makefile that was in the same cgi folder. However when I tried copying those to my server and running the command "make status.cgi" I got "no rule to make target 'status'. Stop.
SOLVED:
Recreating just the status.cgi file proved difficult and trivial. What I did to get the file back was this.
I created a copy of my whole /usr/local directory just to have a
backup.
I downloaded the source for a new full install of nagios for the specific version I had installed.
./configure
make all
make install <- this recreates all the cgi files.
I then recopied my original local directory back (changing the name of the one I just made)
Then moved the status.cgi file from the new local directory to the original one (in /usr/local/nagios/sbin)
the status.cgi file is now working again
you need the command:
make install-webconf
That'll recreate the files and drop them where they need to be

Asdocs seems unable to find embedded assets

I'm running asdocs from a .bat file with flex sdk 3.2.0 (I have replaced my long project root folder with PROJECTROOT):
"C:\Program Files (x86)\Adobe\Flex Builder 3\sdks\3.2.0\bin\asdoc" -source-path . "C:\Program Files (x86)\Adobe\Flex Builder 3\sdks\3.2.0" "_PROJECTROOT_\Components\src" "C:\_PROJECTROOT_\assets" -doc-sources .
PAUSE"
Unforunately, I keep getting errors similar to this:
"_PROJECTROOT_\assets\styles.css(344): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = "close_button.png")'.
downSkin: Embed(source="close_button.png");"
I really don't understand this as "close_button.png" is in the same folder as styles.css. When I build the project from within flexbuilder, it compiles it fine and does not throw any errors.
Does anyone know what I'm doing wrong?
It's not using your folder with the CSS as the root folder when it's working. It's looking for the assets in the folder you are running the commands from.
Try adding the assets folder to your source path.
I had a similar problem, and an answer I found elsewhere indicated to put a slash at the beginning of the asset path. That is, instead of
Embed(source="close_button.png")
rather
Embed(source="/close_button.png")

Resources