pip failed to install dbus-python - python-3.x

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

Related

Haskell / Stack / Nix build fails, requiring pkg-config >= 0.9.0 and cairo >= 1.2.0, but latest versions are pkg-config 0.29.2 and cairo 1.15.4

I'm building a Haskell project using Stack and Nix and depending on the cairo library from Hackage.
When I build the project, I get an error: unable to find pkg-config >= 0.9.0 or cairo >= 1.2.0. However, the latest versions according to their websites are pkg-config 0.29.2 and cairo-1.15.4, and this is reflected in the Nix package manager as well.
On the other hand, there's
this article from 2006 announcing the release of Cairo 1.2.0, which further confuses the issue.
Questions
Why are the expected versions so wildly different from the published versions on nixpkgs and the pkg-config / cairo websites?
What advice do you have to get cairo to build on macOS (best case scenario: using Nix for system packages and Stack for Haskell packages)
Steps to reproduce:
> stack new cairo-test simple && cd cairo-test
# Now, to get Cairo
> stack install cairo
cairo-0.13.3.1: configure ...
Process exited with code: ExitFailure 1
Configuring cairo-0.13.3.1...
setup: The program 'pkg-config' version >=0.9.0 is required but it could not be found.
# This version doesn't seem to exist (not on the pkg-config website, either).
> nix-env -qaP pkg-config
nixpkgs.pkgconfig pkg-config-0.29.2
nixpkgs.pkgconfigUpstream pkg-config-0.29.2
# However, if installed, a new error:
> nix-env -i pkg-config
installing ‘pkg-config-0.29.2’
building path(s) ‘/nix/store/m4ks2si7b78757c1rc43r0833pxkvjb3-user-environment’
created 102 symlinks in user environment
> stack install cairo
setup: The pkg-config package 'cairo' version >=1.2.0 is required but
it could not be found.
# Again, this version doesn't seem to exist, either on the site on in `nixpkgs`
> nix-env -qaP cairo
nixpkgs.cairo cairo-1.14.8
# Installing it anyway, to see what the next error is
> nix-env -i cairo
installing ‘cairo-1.14.8’
building path(s) ‘/nix/store/dcx0in96wcd7yd8q71y93jd5306vag8g-user-environment’
created 112 symlinks in user environment
# Get the same version error now that Cairo is installed
setup: The pkg-config package 'cairo' version >=1.2.0 is required but it could not be found.
The issue is not the library version, 1.14.8 is greater than 1.2.0. The problem is that the cairo development files don't get linked into your environment, that is, $PKG_CONFIG_PATH is not set.
Three solutions:
Find the cairo-dev directory in /nix/store, and add it to PKG_CONFIG_PATH. E.g.,
$ cairodev=$(nix-store --query --outputs $(nix-instantiate '<nixpkgs>' -A cairo) | grep dev$)
$ export PKG_CONFIG_PATH=$cairodev:$PKG_CONFIG_PATH
Run stack from within a nix shell, nix-shell -p pkgconfig cairo.
Use stack's nix support, by adding the following to stack.yml:
nix:
enable: true
packages: [pkgconfig, cairo]
By installing Homebrew and then cairo with brew install cairo, I was able to build the project.
However, this installed Cairo version 1.14 — the same that Nix installed! When I inspect with brew info cairo, I see some more information:
cairo: stable 1.14.8 (bottled), devel 1.15.4, HEAD
==> Dependencies
Build: pkg-config ✘
Required: freetype ✔, fontconfig ✔, libpng ✔, pixman ✔, glib ✔
I tried installing these dependencies with Nix, and uninstalling Homebrew. No luck -- got a ton of linking errors. And so I re-installed Homebrew and it works again.
This isn't the nice, clean solution I was looking for (had to install an external package manager), but it does solve the problem for now.

ncl: /lib/x86_64-linux-gnu/libssl.so.10: version `libssl.so.10' not found (required by ncl)

This is in reference to running the WRF model in my system. I am trying to run the file plotgrids.ncl to ensure that the domain is in the right location before running geogrid.exe . Running the following command in my terminal(ubuntu)
ncl util/plotgrids.ncl
gives me the following error:
ncl: /lib/x86_64-linux-gnu/libssl.so.10: version 'libssl.so.10' not found (required by ncl)
ncl: /lib/x86_64-linux-gnu/libcrypto.so.10: version 'libcrypto.so.10' not found (required by ncl)
at one NCL 6.4.0 installation at Ubuntu 10.10 the solution was
searching a compat-openssl10 package, as
compat-openssl10-1.0.2j-9.fc26.x86_64.rpm
turn it into a .deb package by doing this steps:
apt-get install libdpkg-perl
alien compat-openssl10-1.0.2j-9.fc26.x86_64.rpm
dpkg -i compat-openssl10_1.0.2j-10_amd64.deb
find / -name libssl.so.*
will now show it at /usr/lib/ libssl.so.10
NCL will still complain about GLIBC version
at this case that was solved by editing
vi /etc/apt/sources.list
:%s/maverick/wily/g
apt-get update
apt-get install libc6
this still shows as 2.15 with
ldd --version
however now the test works with
ng4ex xy01n -clean
for Ubuntu 16 please check help given by NCL forum at
mailman.ucar.edu/pipermail/ncl-install/2017-November/thread.html
as resumed here:
http://conda.pydata.org/miniconda.html
used Python 3.6 Linux 64-bit (bash installer)
cd /home/user/Downloads/
chmod +x Miniconda2-latest-Linux-x86_64.sh
./Miniconda2-latest-Linux-x86_64.sh
conda -V
conda 4.3.30
http://ncl.ucar.edu/Download/conda.shtml
conda create -n ncl_stable -c conda-forge ncl=6.4.0 gsl
root#hostname:~# source activate ncl_stable
(ncl_stable) root#hostname:~# ncl -V
6.4.0
ng4ex xy05n -clean -W png
it works!
outside conda (ncl_stable)
ng4ex
The program 'ng4ex' is currently not installed. You can install it by:
sudo su
vi /etc/apt/sources.list
add at the end
deb http://http.us.debian.org/debian/ testing non-free contrib main
exit editor
apt-get update
apt install libncarg-bin

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

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

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

Can't build gem -- native extension build fails -- can you see why?

I can't figure out what is going wrong here -- any ideas??
I'm running on a Ubuntu 8.04 LTS, and have installed libxml2 and libxslt from these instructions:
http://www.techsww.com/tutorials/libraries/libxml/installation/installing_libxml_on_ubuntu_linux.php
http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php
However, I installed the latest versions:
libxslt-1.1.24
libxml2-2.7.3
The install was uneventful
-------------------- I set LD_LIBRARY_PATH ----------------------------------
echo $LD_LIBRARY_PATH
/usr/local/libxslt/lib:
------------- seems like the function is present -- at least based on the output of strings ------------
/usr/local/libxslt/lib$ strings * | grep ParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
xsltParseStylesheetDoc
----------------------- But the compile still fails ----------------------------------------
sudo gem install webrat
Building native extensions. This could take a while...
ERROR: Error installing webrat:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb install webrat
checking for iconv.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for libxml/parser.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for libxslt/xslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for libexslt/exslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2... yes
checking for xmlParseDoc() in -lxml2... yes
checking for xsltParseStylesheetDoc() in -lxslt... no
libxslt is missing. try 'port install libxslt' or 'yum install libxslt-devel'
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/bin/ruby
--with-iconv-dir
--without-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-xml2lib
--without-xml2lib
--with-xsltlib
--without-xsltlib
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.3.3 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/nokogiri-1.3.3/ext/nokogiri/gem_make.out
In Ubuntu you need to follow these steps:
sudo apt-get install libxml2-dev
sudo apt-get install libxslt-dev
Jared Evans in this post on his blog, described a solution that worked for me on Ubuntu 8.04 LTS. His trick is to NOT use apt-get to install rubygems, but rather to build it from source. This worked great for me. His post is directed at installing rails, so I used these (modified slightly) steps from it to just install nokogiri:
FIRST INSTALL RUBY WITH APT-GET:
sudo apt-get update
sudo apt-get install ruby irb ri rdoc ruby1.8-dev libzlib-ruby
libyaml-ruby libreadline-ruby libncurses-ruby libcurses-ruby libruby
libruby-extras libfcgi-ruby1.8 build-essential libopenssl-ruby
libdbm-ruby libdbi-ruby libdbd-sqlite3-ruby sqlite3 libsqlite3-dev
libsqlite3-ruby libxml-ruby libxml2-dev
IN ADDITION TO JARED'S INSTRUCTIONS I ALSO INSTALLED (I'm not certain that libxslt1.1 is necessary):
sudo apt-get install libxslt1.1
sudo apt-get install libxslt1-dev
DOWNLOAD RUBYGEMS SOURCE:
Download the latest RubyGems (currently 1.3.6) from rubyforge (I used the zip package).
BUILD RUBYGEMS:
cd /TO/DIRECTORY/WHERE/YOU/UNZIPPED/rubygems-1.3.6/
sudo ruby setup.rb
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
INSTALL NOKOGIRI:
sudo gem update –system
sudo gem install nokogiri
The response will be:
1 gem installed
Installing ri documentation for nokogiri-1.4.1...
No definition for parse_memory
No definition for parse_file
No definition for parse_with
No definition for get_options
No definition for set_options
Installing RDoc documentation for nokogiri-1.4.1...
No definition for parse_memory
No definition for parse_file
No definition for parse_with
No definition for get_options
No definition for set_options
I haven't yet noticed any problems caused by the 'No definition' messages...
Try removing the libxslt* and install them again. That fixed the issue for me.
You have to install the development kits of these libraries.
I get the same error when trying to install to a non-standard location (as I don't have access to directories outside my home directory). It seems as if this answer simply installed to the default location in /usr for success. Or did I misunderstand?
More context about what I'm trying to do at http://groups.google.com/group/nokogiri-talk/browse_thread/thread/c1e909be09e90f5a, if that's helpful.
Here's what worked for me on Ubuntu 11.04 (natty):
sudo apt-get install libxslt-dev libxml2-dev
sudo gem install nokogiri

Resources