Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to find out, which version of the Apache Portable Runtime is installed on a specific server.

So how can I do this without access to the log files?

share|improve this question

5 Answers 5

Write one line of C :

# cat apr.c
int main(void) {
        printf("%s\n",apr_version_string());
}

Compile (find the good path to your libarp)

# gcc -o apr apr.c /usr/pkg/lib/libapr-1.a

execute

# ./apr
1.3.3

PS: to find libapr you can try

ls /usr/lib/libapr*; ls /usr/local/lib/libapr*;ls /lib/libapr*;locate libapr; ...

or run ldd over httpd as david says if you want to find the version used by apache

share|improve this answer

You don't provide much information, but there are several methods you could try.

  1. Ask your package manager. This assumes that you have a system wide libapr installed via your package management system. Debian would be dpkg -l "*apr*". RPM would be something like rpm -qa | grep -i apr.
  2. Of course, you might have installed it from source, in which case the library might have the version number encoded in the file name. Run locate libapr and it should show something like "/usr/lib/libapr-1.2.3.so"
  3. Maybe that didn't find it. Try ldd /usr/sbin/httpd (or what ever your APR using binary is) and you'll see what library file your binary will use. This should also show the version number, or will show the location of a symlink to the file with a version number in the name.
  4. Finally, it's possible that your binary has APR statically linked in. You can tell if ldd above didn't have APR in the list. You might be able to get a version number by running strings /usr/sbin/httpd and looking through for a version number that looks likely. You could also do this if you don't have a .so file with the version number encoded into it.
share|improve this answer

On windows platform, check this file on apache bin folder: apr-1-config.pl

Specifically, the apr version string is stored at this line: my ${APR_DOTTED_VERSION} = q[1.4.5];

So, 1.4.5 is your current apr version

share|improve this answer
$ find / -name *apr* 2>/dev/null 1>/tmp/apr-findings
$ less /tmp/apr-findings

This helped me, because it was so bad documented. I don't know any nicer solution.
If you find a file named libapr*.la and you cannot figure out its version number, look into it. In my case it's something like this:

# Version information for libapr-0.
current=9
age=9
revision=4
share|improve this answer

If you're just trying to find out what version is linked with Apache, /usr/local/apache2/bin/httpd -V will tell you.

share|improve this answer

Your Answer

 
discard

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