Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have installed apache2 in my ubuntu 12.4 using sudo apt-get install apache2, now i am not able to start the server, when i use service apache2 start, following things were displayed.

    bharathkumar@hkbharath:~$ service apache2 start
    * Starting web server apache2                                                     
    /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
    mktemp: failed to create directory via template `/var/lock/apache2.XXXXXXXXXX': No such file or directory
    chmod: missing operand after `755'
    Try `chmod --help' for more information.
                                                                                 [fail]

i tried uninstalling and reinstalling apache2, but still getting the same thing, please help me to start my apache2 server.

Thanks

share|improve this question

2 Answers 2

up vote 4 down vote accepted

I had the same problem running on a virtual server. Turns out that /var/lock is a symbolic link to /run/lock, which didn't exist. I solved it like this:

sudo mkdir /run/lock

Then restart Apache:

sudo service apache2 restart

Hope it works for you.

share|improve this answer
    
yeah i did the same thing and added the output file of mktemp to that folder. –  Bharathkumar Hegde Jun 17 '13 at 17:56

To start Apache, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo /etc/init.d/apache2 start 

You can also try

sudo /etc/init.d/apache2 restart
or
sudo service apache2 restart
share|improve this answer
    
I am getting the same thing as i shown in the question.?? can you give me some more suggestions –  Bharathkumar Hegde Jun 9 '13 at 19:25
2  
Are you using sudo? –  Leo Jun 9 '13 at 19:26
    
Try what I added in the answer. –  Mitch Jun 9 '13 at 19:31
    
Getting same messages.. –  Bharathkumar Hegde Jun 9 '13 at 19:34
    
Try mktemp, and use the output /tmp/tmp.xxxxxxxxxx to store your output. –  Mitch Jun 9 '13 at 19:40

Your Answer

 
discard

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.