Configure Linux Package Config Path


Hi all!

Since yesterday, July 3 2012, I was doing another task in ThinkCubic. The task is quite simple, but it is only for a while.Ā  My team is assigned to package their application to be used in Linux. My job is to package in rpm.

While packaging, we have to make sure about the dependency. Sure, you will not want your app is unusable and everybody asks about it. šŸ˜€ So, when trying to find the dependency, I met this Magick++ not found in pkgconfig path. I thought, “Whoa?! What is this?!” I am Windows user, this error confuses me. I search in the internet and forums, all is weird. I follow what they say and it is still not working!

So, I got a simple explanation using some commands in terminal. Those are man, export, which, and locate. Because what the application needs is not found, they suggest me to add a path containing specific file, in my case is Magick++.pc, into pkgconfig path environment. The work is quite simple.

First, locate the file. Find out where it is using the command below.

locate pkgconfig

Then, take a note where the path of the pkgconfig with needed file is. Usually it is in /usr/bin/pkg-config or in /usr/local/lib/pkgconfig. Nah, the problem is when you are trying to modify the environment path (PKG_CONFIG_PATH). Usually user will just make it like:

PKG_CONFIG_PATH=<new path>

I made it that way, and I got stuck for one full night! So I try to ask my friend and he just solve the simple error easily! That command before must be:

PKG_CONFIG_PATH=<new path>/

Finally you can type:

export PKG_CONFIG_PATH

That’s it! All you need are those steps. I was working on this simple error for two days, and I don’t want any other newbies feel the same error. It is just me or not, but I want to share. šŸ™‚

EDIT
I was quite wrong about the config path, the fact is that the path may be configured automatically if you install the software using yum. Just look in some repositories it will help you a lot. šŸ™‚

Advertisements

Author: Aditya Yedija Situmeang

Developer, Lover, Christian, Omnomnomnivore, Gamer.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s