Problems Installing Subversion From Source On CentOS
March 26, 2008 – 12:23 amI was setting up a new server for someone, and encountered this error while I was trying to build svn
/usr/bin/ld: cannot find -lexpat
Now, while I can do some things on that a sys admin can, I am by no means a sys admin. I have only installed svn a handful of times, and I didn’t know what this was.
First I installed expat from source. It didn’t help.
I then installed apr and apr-util. Didn’t help. I probably needed to follow these instructions.. but I didn’t.
Libraries have been installed in:
/usr/local/apr/libIf you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
- use the `-Wl,–rpath -Wl,LIBDIR’ linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf’
Decided I don’t care anymore about trying to figure out why it wasn’t working and just got the subversion dependencies from their site, untarred them into the svn folder as recommended. Everything compiled without issue.
On the make install, I got this:
/usr/local/src/subversion-1.4.6/subversion/svnversion/.libs/lt-svnversion: error while loading shared libraries: /usr/local/src/subversion-1.4.6/subversion/libsvn_delta/.libs/libsvn_delta-1.so.0: cannot restore segment prot after reloc: Permission denied
make: *** [revision-install] Error 127
Googling that error got me to this site, where it suggested SELinux might be breaking it. I disabled it and rebooted the machine. The install proceeded without issue at this point.



5 Responses to “Problems Installing Subversion From Source On CentOS”
yum install subversion. Works perfectly every time
By Josh on Mar 27, 2008
This wasn’t about how to install subversion with yum. It was about figuring out why something didn’t work and the solution I went with.
By jon on Mar 27, 2008
You actually don’t have to reboot the server to disable SELINUX,
echo 0 > /selinux/enforce
Although this is temporary. Setting SELINUX=disabled in /etc/sysconfig/selinux would set it permanent in case the server was ever rebooted. Thanks !
By Swapneel on Apr 11, 2008
Swapneel, good tip, thanks! I’ll use it next time.
By jon on Apr 16, 2008
Thanks for the tip!!! I was losing my mind trying to figure out why ‘make install’ was failing. Tried your suggestion and it fixed the problem.
By Rich on Jun 23, 2008