Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed manually apr and apr_util so i can install activemq cpp library.

When i try to make the cpp library i get the following error:

/usr/bin/ld: cannot find -lexpat
collect2: ld returned 1 exit status

and expat is within apr-util and not being linked. how can i update the ld path so that make or environment will find it?

or in short: how can i resolve this?

share|improve this question
rpm -qa | grep expat? – quanta Oct 26 '11 at 4:08
expat-1.95.8-8.3.el5_5.3 expat-1.95.8-8.3.el5_5.3 – user30597 Oct 26 '11 at 4:13
up vote 1 down vote accepted


It looks like you need to install expat-devel package:

# yum install expat-devel

Add the library path to /etc/ (or /etc/ if you installed to non-standard location and run ldconfig.

share|improve this answer
no luck. it didnt help... – user30597 Oct 26 '11 at 4:03
updated my answer. – quanta Oct 26 '11 at 4:20
sweet! worked. thanks. – user30597 Oct 26 '11 at 4:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.