I am sorry, I am not experienced with gcc and installing packages from source, and can't fix my problem:
I am trying to install ncmpcpp from source (github) on Ubuntu 14.04 (the reason is that visualizers are colored in version 0.7.1).
So previously I installed mpd, and ncmpcpp from the repository (version 0.5.10) worked great.
Now my installation steps (after having removed ncmpcpp with apt-get):
git clone https://github.com/arybczak/ncmpcpp
cd ncmpcpp
./autogen.sh
The error I get is:
configure: error: libmpdclient >= 2.8 is required!
However, here is the result of apt-cache policy libmpdclient2
:
libmpdclient2:
Installé : 2.9-1ubuntu1
Candidat : 2.9-1ubuntu1
Table de version :
*** 2.9-1ubuntu1 0
500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
After some googling, I tried this command: ldconfig -p | grep mpdclient
:
libmpdclient.so.2 (libc6,x86-64) => /usr/lib/libmpdclient.so.2
But I can actually verify that pkg-config does not find it:
$ pkg-config --exists --print-errors "libmpdclient2"
Package libmpdclient2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libmpdclient2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libmpdclient2' found
Trying with "libmpdclient"
returns the same.
I searched my computer using sudo find / -name "libmpdclient2.pc"
and nothing came up.
When you read the configure.ac file (whose syntax is unfamiliar to me), you see this, and I wonder if it checks for libmpdclient
or libmpdclient2
:
dnl ==============================
dnl = checking for libmpdclient2 =
dnl ==============================
PKG_CHECK_MODULES([libmpdclient], [libmpdclient >= 2.8], [
AC_SUBST(libmpdclient_CFLAGS)
AC_SUBST(libmpdclient_LIBS)
CPPFLAGS="$CPPFLAGS $libmpdclient_CFLAGS"
AC_CHECK_HEADERS([mpd/client.h],
LIBS="$LIBS $libmpdclient_LIBS"
,
AC_MSG_ERROR([missing mpd/client.h header])
)
],
AC_MSG_ERROR([libmpdclient >= 2.8 is required!])
)
Sorry for the long post, I am out of clues. I have the feeling that this is a package for Archlinux users rather than Ubuntu ones but I like it a lot!
Usually, in the Ubuntu packaging scheme, files that are needed for software development using a library (including header files, and pkg-config
.pc
files where provided) are split off from the runtime library itself, and provided as a separate package.Most often that package has the same name as the runtime library package, plus a
-dev
suffix, for examplehowever in this case it appears that the development package corresponding to
libmpdclient2
is simplylibmpdclient-dev
:while
Installing the
libmpdclient-dev
package should provide the necessary development files and keeppkg-config
happy, but you have to use the correct package name: