LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-04-2010, 02:08 AM   #1
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Rep: Reputation: 15
Cannot start Apache as non-root anymore: missing libaprutil-1.so.0 ??


I have a web application running on a production server. The production server already has its own Apache. My web application runs on its own Apache, which runs on port 8000, and mapped to the "primary" Apache through reverse proxy (my Apache www root is seen as a sub-folder in the primary Apache).

The primary Apache resides in /usr/sbin, while my Apache resides in /home/user1/fgs/www/bin/. I always start my Apache using user1 instead of root, and never had problem with such thing before. Anyway, I start my Apache with the following command:
Code:
/home/user1/fgs/www/bin/httpd -d /home/user1/fgs/www -f /home/user1/fgs/www/conf/live.httpd.conf -k start
Like I said, I've never had problem with such thing before.

Lately, my web application just stopped working. After some investigation, I discovered my Apache just won't start anymore. Everytime I start my Apache using user1 account, I always get the following error:
Code:
/home/user1/fgs/www/bin/httpd: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory
Oddly enough, I can start my Apache using the root account (the pid shows when I use ps aux | grep httpd command. However, the browser always shows a "Forbidden" error if I start my Apache using root account.
Quote:
Forbidden

You don't have permission to access / on this server.
What happened? The server technicians said that they deleted some files prior to the malfunctioning of my web applications. What file is missing, and what should I do to restore it?

Many thanks,
-Kresh
 
Old 05-04-2010, 04:02 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Hi,

You can run
Code:
ldd /home/user1/fgs/www/bin/httpd
to see where httpd is looking for the missing library (probably in /home/user1/fgs/www/lib).
Since root can start apache, I guess the library exists in the system library path, so you can make a symlink to it:
Code:
ln -s /usr/lib/libaprutil-1.so /home/user1/fgs/www/lib
 
Old 05-05-2010, 02:48 AM   #3
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bathory View Post
Hi,

You can run
Code:
ldd /home/user1/fgs/www/bin/httpd
to see where httpd is looking for the missing library (probably in /home/user1/fgs/www/lib).
Since root can start apache, I guess the library exists in the system library path, so you can make a symlink to it:
Code:
ln -s /usr/lib/libaprutil-1.so /home/user1/fgs/www/lib
Thanks! I'll definitely try it.

By the way, I just wonder: what made the library missing on the first place? I don't really know what happened to the server (and nor do the 'systems engineers', by the way). All I know is that they have removed the email service from the server and moved it somewhere else. Is it possible they erase the symlink by accident?
 
Old 05-05-2010, 03:06 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
No, I don't think so. Unless they removed the system libarputil.
Most likely someone deleted the aprutil library that came with the apache you installed in your homedir

Regards
 
Old 05-27-2010, 03:26 AM   #5
Kreshna
Member
 
Registered: Oct 2006
Posts: 45

Original Poster
Rep: Reputation: 15
Sorry for thread necro, but....

I don't understand. libaprutil-1.so.0 does exist in my Apache installation.
Quote:
[user1@server fgs]$ find /home/user1/fgs/ -name libaprutil*
/home/user1/fgs/www/lib/libaprutil-1.so.0.2.12
/home/user1/fgs/www/lib/libaprutil-1.so.0
/home/user1/fgs/www/lib/libaprutil-1.a
/home/user1/fgs/www/lib/libaprutil-1.la
/home/user1/fgs/www/lib/libaprutil-1.so
[user1@server fgs]$
Yet the error persists:
Quote:
/home/user1/fgs/www/bin/httpd: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory
The libaprutil-1.so.0 is apparently a symlink to libaprutil-1.so.0.2.12.
Quote:
[user1@server fgs]$ ls -al /home/user1/fgs/www/lib/libaprutil-1.so.0
lrwxrwxrwx 1 user1 user1 22 Nov 28 13:52 /home/user1/fgs/www/lib/libaprutil-1.so.0 -> libaprutil-1.so.0.2.12
But libaprutil-1.so.0.2.12 does exist in /home/user1/fgs/www/lib/ directory, as shown above.

What happens? Help.
 
Old 05-27-2010, 04:09 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,159
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Hi,

You didn't post the output of
Code:
ldd /home/user1/fgs/www/bin/httpd
but I guess httpd searches for libaprutil in the wrong place.
Anyway to make apache use the aprutil library installed in /home/user1/fgs/www/lib, you can use LD_LIBRARY_PATH, before running "apachectl start"
Code:
export LD_LIBRARY_PATH=/home/user1/fgs/www/lib:$LD_LIBRARY_PATH
/home/user1/fgs/www/bin/apachectl start
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 2.2.3-11 RPM Missing Dependency libaprutil-1.so.0 johni Linux - Newbie 5 07-29-2011 03:11 PM
fresh netinst of squeeze:X server fails to start, missing /dev/fb0, missing xorg.conf frumpus Debian 7 03-17-2010 12:36 PM
Mandriva 2008 cannot install Apache, PHP, MySQL, etc., First Error: libaprutil-1.so.0 FirstBorn Linux - Software 7 07-07-2008 04:57 PM
Apache won't start - missing SSL certificates, howto recreate them? GoBillsBN Linux - Networking 3 01-31-2007 06:22 PM
X does not start anymore foxy123 SUSE / openSUSE 10 03-09-2005 04:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration