Linux - Qmake Compiling Error - 'vorbisfile not found' although installed - linux

I try to compile Goldendict on Debian. I have installed all the necessary dependencies, including libvorbis-dev, as listed in the 'README.md' file. However, I'm immediately running into the following error message when executing qmake or qmake-qt4.
JohnDoe#debian:~/goldendict$ qmake
Project MESSAGE: Install Prefix is: /usr/local
sh: 1: pkg-config: not found
Project ERROR: Package vorbisfile not found
JohnDoe#debian:~/goldendict$
I have tried to install it without the audio player support, but it's not working either.
JohnDoe#debian:~/goldendict$ sudo qmake "DISABLE_INTERNAL_PLAYER=1"
Project MESSAGE: Install Prefix is: /usr/local
sh: 1: pkg-config: not found
Project ERROR: Package vorbisfile not found
JohnDoe#debian:~/goldendict$
I have Qt version 4.8.6 installed.
Here are the instructions on 'how-to install Goldendict', which I have followed: https://github.com/goldendict/goldendict/blob/master/README.md
How can I get this work? Any help is welcome.
PS: Here's the proof that the vorbis package is installed.
PROOF from dpkg:
JohnDoe#debian:~$ dpkg -s libvorbis-dev
Package: libvorbis-dev
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 1715
Maintainer: Debian Xiph.org Maintainers <pkg-xiph-maint#lists.alioth.debian.org>
Architecture: amd64
Multi-Arch: same
Source: libvorbis
Version: 1.3.4-2
Depends: libogg-dev, libvorbis0a (= 1.3.4-2), libvorbisenc2 (= 1.3.4-2), libvorbisfile3 (= 1.3.4-2)
PROOF from apt-get:
JohnDoe#debian:~/goldendict$ sudo apt-get install libvorbis-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libvorbis-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
JohnDoe#debian:~/goldendict$

Not on Debian, but on Mac it was a problem. The workaround is, you can change your .pro file for Qt projects, so that it does not look for pkg-config, by adding the following line:
QT_CONFIG -= no-pkg-config
Another guess would be that your path is not set properly. I would try adding the pkg-config path to the environment variable:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/<path_to_pkg-config>/pkgconfig

Related

'CANNOT LINK EXECUTABLE "node": library "libcrypto.so.3" not found

In Termux (my_distro):
$ pkg show openssl
Package: openssl
Version: 3.0.1-1
Maintainer: #termux
Installed-Size: 6648 kB
Depends: ca-certificates, zlib
Conflicts: libcurl (<< 7.61.0-1)
Breaks: openssl-tool (<< 1.1.1b-1), openssl-dev
Replaces: openssl-tool (<< 1.1.1b-1), openssl-dev
openssl installed pkg:
openssh/stable 8.8p1-3 aarch64 [upgradable from: 8.8p1-1]
openssl-tool/stable 3.0.1-1 aarch64 [upgradable from: 1.1.1m-2]
openssl/stable 3.0.1-1 aarch64 [upgradable from: 1.1.1m-2]
Installation of nodejs:
$ pkg install nodejs-lts
Setting up nodejs-lts (16.14.0-2) ...
CANNOT LINK EXECUTABLE "node": library "libcrypto.so.3" not found
Aborted
dpkg: error processing package nodejs-lts (--configure):
installed nodejs-lts package post-installation script subprocess returned error exit status 134
Processing triggers for man (1.14.5-3) ...
Errors were encountered while processing:
nodejs-lts
E: Sub-process /data/data/com.termux/files/usr/bin/dpkg returned an error code (1)
After that it shows now.
$ node
CANNOT LINK EXECUTABLE "node": library "libcrypto.so.3" not found
Aborted
$ npm
CANNOT LINK EXECUTABLE "node": library "libcrypto.so.3" not found
Aborted
for me, running pkg upgrade && pkg update has solved the problem
openssl-tool may not be installed if you are running latest termux
Try running:
apt upgrade && apt update
apt install openssl-tool
Orrr... just
pkg update openssl-tool
or
apt update openssl-tool
Is the same.
;)
The google play version of Termux is deprecated.
Installing from Fdroid has solved this problem for me.
https://wiki.termux.com/wiki/Installation
You can also try changing the default repo mirror.
Run the following command:
termux-change-repo
This will drop the shell to an options window allowing you to select an alternative mirror. Once you have selected one, Termux should then run pkg update or apt update on its own.
For me, this solved pretty much all package related issues.
I hope it helps you too.

pip failed to install dbus-python

I planed to install dbus-python:
$ pip --version; python --version
pip 19.0.3 from /home/me/anaconda3/lib/python3.7/site-packages/pip (python 3.7)
Python 3.7.3
The platform:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
When I run pip install dbus-python, it reports these errors:
checking for DBUS... no
configure: error: in `/tmp/pip-install-hr9djbwg/dbus-python/build/temp.linux-x86_64-3.7':
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables DBUS_CFLAGS
and DBUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Check
$ echo $PKG_CONFIG
#return nothing
I installed pkg-config just now:
$ pkg-config --version
0.29.1
It still reports these errors:
checking for DBUS... no
configure: error: Package requirements (dbus-1 >= 1.8) were not met:
No package 'dbus-1' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables DBUS_CFLAGS
and DBUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
However, the dbus-1 package cannot be installed:
$ pip install dbus-1
Collecting dbus-1
Could not find a version that satisfies the requirement dbus-1 (from versions: )
No matching distribution found for dbus-1
First I looked up for package
sudo apt-cache search dbus-1
Then I installed required packages with command:
sudo apt install libdbus-1-3 libdbus-1-dev
Encountered the same problem. dbus-python seems to be a deprecated module. dbus-next seems to its replacement.
pip install dbus-next

UBUNTU 14.04 64BIT can not install lib32stdc++6

I want install a 32bit application,but i can not install lib32stdc++6
here is:
sudo apt-get install lib32stdc++6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
lib32stdc++6 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
E: Unable to correct problems, you have held broken packages.
finally,i found this
https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages
and i use aptitude to force install this
sudo aptitude -f install lib32stdc++6
run this command ,and choose 'n',then it will give you another choice,then choose 'Y'.
done and success

compiling OpenGL program GL/glew.h missing

I installed OpenGL onto my computer running Linux Mint following the instructions on this tutorial. I am trying to compile a program that uses OpenGL, but I'm getting a compile error: fatal error: GL/glew.h: No such file or directory. I check the /usr/include/GL folder, and glew.h is indeed missing. I don't know why it's missing, because I did the command sudo apt-get install libglew1.5 and it gives the output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libglew1.5 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 465 not upgraded.
Why is the glew.h file missing?
libglew is just the library, but not the development files (headers). You need to install those separately. The package name on Debian based systems is libglew-dev
and for fedora(and possibly its derivatives) it is glew-devel
Run the following command:
sudo apt-get install libglew-dev

Error: gdal-config not found while installing R dependent packages whereas gdal is installed

Please point out the point that I am missing:
openSUSE 11.3
xx#linux-y3pi:~/Desktop/R> sudo R CMD INSTALL rgdal_0.7-12.tar.gz
root's password:
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: gdal-config: gdal-config
checking gdal-config usability... ./configure: line 1353: gdal-config: command not found
no
Error: gdal-config not found
The gdal-config script distributed with GDAL could not be found.
If you have not installed the GDAL libraries, you can
download the source from http://www.gdal.org/
If you have installed the GDAL libraries, then make sure that
gdal-config is in your path. Try typing gdal-config at a
shell prompt and see if it runs. If not, use:
--configure-args='--with-gdal-config=/usr/local/bin/gdal-config'
with appropriate values for your installation.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/lib64/R/library/rgdal’
xx#linux-y3pi:~/Desktop/R> whereis gdal-config
gdal-config: /usr/local/bin/gdal-config
xx#linux-y3pi:~/Desktop/R> gdal-config
Usage: gdal-config [OPTIONS]
Options:
[--prefix[=DIR]]
[--libs]
[--dep-libs]
[--cflags]
[--datadir]
[--version]
[--ogr-enabled]
[--formats]
xx#linux-y3pi:~/Desktop/R>
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
xx#linux-y3pi:~/Desktop/R> gdal-config --version
1.9.0
xx#linux-y3pi:~/Desktop/R> proj
Rel. 4.8.0, 6 March 2012
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]
linux-y3pi:~ # $PATH
bash: /home/xx/qtsdk-2010.05/qt/bin/:/home/xx/qtsdk-2010.05/bin:/home/xx/qtsdk-2010.05/qt/bin:/home/xx/qtsdk-2010.05/qt/bin/:/home/xx/qtsdk-2010.05/bin:/usr/lib64/mpi/gcc/openmpi/bin:/home/xx/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games: No such file or directory
In Ubuntu 18.04
I fixed this by sudo apt install libgdal-dev
Hope someone find this helpful. Some above answers seems to be outdated and lengthy.
In earlier versions (which had apt-get)
sudo apt-get install libgdal-dev
You need the -dev package with headers and shared library links for development besides the normal package for deployment. Two different use cases as far as the distro is concerned.
On my distribution:
edd#max:/tmp$ dpkg -l | grep gdal | cut -c-72
ii libgdal1-1.7.0 1.7.3-6ubuntu3
ii libgdal1-dev 1.7.3-6ubuntu3
edd#max:/tmp$
and R CMD INSTALL rgdal_0.7-8.tar.gz works just fine as you would expect from a CRAN package given all the build-time checks at CRAN.
Update late 2016: As #JoshO'Brien points out in the comment
Minor update: Here in 2016, running Ubuntu 14.04.2, libgdal1h seems to
have replaced libgdal1(though libgdal1-dev is still needed). At least
I get an error to that effect when I attempted to apt-get install libgdal1
For Ubuntu 16.04 the corresponding line would be
sudo apt-get install libgdal1i
Such renaming of upstream libraries is common; something such as apt-cache search libgdal can help locate the current package names. The important key though is that the "abstract" development package libgdal-dev is all that is needed to build as it pulls the "concrete" current run-time package (here: libgdal1i) in via a dependency.
You can use apt-file package, to find which package contains the missing file you are looking for.
First install the apt-file using the command apt-get install apt-file Update apt-file using the command apt-file update Now you can use apt-file to find the missing file. apt-file search gdal-config
For my case, I got the same error when configuring grass-7.1 from svn. As shown below:
$ ./configure
...more...
checking whether to use GDAL... yes
checking for gdal-config... /usr/bin/gdal-config
...more....
./configure: 1: ./configure: /usr/bin/gdal-config: not found
./configure: 6093: test: =: unexpected operator
configure: error: *** Unable to locate GDAL library.
But, after looking for gdal-config file with apt-file as shown below, I was able to resolve the error, after installing the package libgdal1-dev
$ apt-file search gdal-config
Results
libgdal1-dev: /usr/bin/gdal-config
So I installed libgdal1-dev, as shown below:
$ sudo apt-get install libgdal1-dev
This happens because the configuration failed for package ‘rgdal’
so we have to install necessary dependencies.
The packages libgdal-dev and libproj-dev are required:
sudo apt-get install gdal-bin proj-bin libgdal-dev libproj-dev
Then install rgdal by
install.packages("rgdal")
Load rgdal by
library(rgdal)
On macOS
brew install gdal
removed the error
gdal-config not found
Try this on CentOS 6
sudo yum install gdal gdal-python gdal-devel mapserver mapserver-python libxml2 libxml2-python python-lxml python-pip python-devel gcc
Read the reference manual.
SystemRequirements for building from source: GDAL >= 1.6.0 library
from http://trac.osgeo.org/gdal/wiki/DownloadSource and PROJ.4 (proj
>= 4.4.9) from http://trac.osgeo.org/proj/;
The same problem occurred today to me on a Linux CentOS 6.10 on which I do not have administration rights.
What I did:
a) Create a conda environment dedicated to my R version
conda create --name MYR
b) Activate the environment
source activate MYR
c) Install R
conda install -c conda-forge r-base
d) Install libgdal
conda install -c conda-forge libgdal
This solved the problem for me. My R version was 4.1.3. I guess other versions should work.
For manjora or archlinux, just try:
yay -S gdal

Resources