I went to install the latest Subversion 1.4.0 from scratch on a pristine Fedora Core 6 installation by building directly from source, an activity I’ve done many times in the past.
The code build and installed fun, but running svn, produced this mysterious error message:
error while loading shared libraries: /usr/local/lib/libsvn_ra_dav-1.so.0: cannot restore segment prot after reloc: Permission denied
Here’s how to fix the problem.
The message appears to be related to permission problems involving protections after relocation. What specifically this is all about, I’m not sure. However.
Fedora Core ships by default with something called SELinux, a security enhanced extension that introduces additional access control policies that confine user programs to the minimum amount of privileges required to do their jobs, which in turn improves security if a compromised program tries to extend its reach beyond what it’s suppose to touch. [See the Fedora Wiki page on SELinux]
Most people, however, don’t need it and find that it often gets in the way. Web masters encounter this as existing files in a web directory can be served, but new ones created can not be served — although all permissions and httpd.conf settings look right. When weird messages about permissions crop up, suspect SELinux.
Turning off SELinux, however, is quite simple. As root, edit /etc/selinux/config, find the line that says SELINUX= and set its value to disabled. I always find rebooting at this point is a good thing.
Anyhow, that fixed my subversion installation and running problem.
Update: If you think you may want SELinux, try permissive instead of disabled. This will let the access happen, but log the problem.