38

I have been building freerpd client for Eclipse in Ubuntu 14.04 but an error is popping up :

Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)

when I use CMake 2.8. How can I get rid of it?

3
  • You are either missing the cmake-data package, have managed to delete some files it contains, or Eclipse is using a different cmake than comes in Ubuntu, or is messing with the default modules path environment of cmake.
    – dobey
    Commented Jan 5, 2016 at 17:27
  • eclipse is out of question as it is not involved in building, cmake-data is already there ,is there any possiblity that i can correct it with path environment ? Commented Jan 5, 2016 at 18:20
  • 2
    Does sudo apt-get install --reinstall pkg-config cmake-data help, in case any of their files were corrupted? Commented Jan 5, 2016 at 22:50

3 Answers 3

58

Try:

sudo apt-get install pkg-config
4
  • i tried that but no use Commented Jan 5, 2016 at 17:18
  • Did you also try sudo apt-get install cmake-data like dobey suggested? Commented Jan 5, 2016 at 17:58
  • yes , ananthu@ananthu-System-Product-Name:~/FreeRDP-masteropy$ sudo apt-get install cmake-data [sudo] password for ananthu: Reading package lists... Done Building dependency tree Reading state information... Done cmake-data is already the newest version. cmake-data set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 594 not upgraded. Commented Jan 5, 2016 at 18:13
  • but it is not solved then also Commented Jan 5, 2016 at 18:17
7

I ran into this nuts problem while compiling opencv. The problem is that CMake is not finding the pkg-config executable.

Fix like this:

1)In ubuntu terminal,

which pkg-config

You will get "usr/bin/pkg-config" if it's installed

2) Add

set(PKG_CONFIG_EXECUTABLE "/usr/bin/pkg-config")

to your Cmake file, or in your build directory, run "cmake-gui" to add it using the GUI. Now, Cmake will find the pkg-config.

2

https://github.com/vitalif/grive2/issues/74

SOLUTION that worked for me:

sudo apt-get install --reinstall pkg-config cmake-data
1
  • Linux Ubuntu 18.4. Commented Mar 18, 2020 at 15:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .