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 am in desperate need to install apache on my Ubuntu 12.04. I searched on the web and tried to follow the instructions given in: https://help.ubuntu.com/10.04/serverguide/httpd.html

Log from my terminal pasted here for your reference:

jacob@jacob-laptop:~$ sudo apt-get install apache2 
[sudo] password for jacob: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
apache2 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up crossplatformui (1.0.27) ...
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service acpid restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop acpid ; start acpid. The restart(8) utility is also available.
acpid stop/waiting
acpid start/running, process 8643
package libqtgui4 exist
QT_VERSION = 4
make -C /lib/modules/3.2.0-25-generic/build M=/usr/local/bin/ztemtApp/zteusbserial/below2.6.27 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-25-generic'
  CC [M]  /usr/local/bin/ztemtApp/zteusbserial/below2.6.27/usb-serial.o
/usr/local/bin/ztemtApp/zteusbserial/below2.6.27/usb-serial.c:34:28: fatal error: linux/smp_lock.h: No such file or directory
compilation terminated.
make[2]: *** [/usr/local/bin/ztemtApp/zteusbserial/below2.6.27/usb-serial.o] Error 1
make[1]: *** [_module_/usr/local/bin/ztemtApp/zteusbserial/below2.6.27] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-25-generic'
make: *** [modules] Error 2
dpkg: error processing crossplatformui (--configure):
 subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
 crossplatformui
E: Sub-process /usr/bin/dpkg returned an error code (1)
share|improve this question
    
Which version Apache? –  Mitch Jun 7 '12 at 17:19
    
By the way, I saw you were working from the 10.04 LTS version of the documentation. This is the 12.04 LTS version of the documentation. –  Eliah Kagan Jun 7 '12 at 17:39
    
if its saying apache2 is the greatest version its already installed. –  Thomas W. Jun 7 '12 at 17:46

4 Answers 4

up vote 3 down vote accepted

The output above shows that you have already installed apache - a line near the top says:

apache2 is already the newest version.

So apache is already installed, you don't need to do anything else.

The rest of the output is apt trying to finish installing another package:

Setting up crossplatformui (1.0.27) ...

This is hitting a problem, and it would be good to clear up this mess. Your options are:

  • remove crossplatformui - sudo apt-get remove crossplatformui
  • install the dependencies that it needs to compile

It is failing to compile because:

... fatal error: linux/smp_lock.h: No such file or directory

and a quick search for ubuntu linux/smp_lock.h brings up this answer which suggests you need to edit the source of crossplatformui and change linux/smp_lock.h to linux/smp.h

You should also ensure you have the build-essential package installed, though as you already have a compiler you probably do already.

share|improve this answer

Try to purge the current install and then install apache2 again, like this:

  • sudp apt-get purge apache2
  • sudo apt-get install apache2
share|improve this answer

Quoted:

The Apache HTTP Server is a web server software that has a big role in the development of the World Wide Web. The latest version for this HTTP Server is Apache 2.4 which comprises more improvements in terms of functionality and performance. Here are some of the novelties in this latest release:

  1. Reduced memory usage compared to Apache 2.2.x
  2. Significant improvement in terms of performance
  3. KeepAliveTimeout in milliseconds
  4. Override Configuration
  5. Event MPM fully supported.
  6. New General-purpose expression parser
  7. Config file variables, etc.

You have to install

sudo apt-get install build-essential

sudo apt-get build-dep apache2

And then to install Apache 2.4 You can find the rest here

Source: discusswire.com

share|improve this answer

Open the terminal, and download the Apache HTTP server

lynx http://httpd.apache.org/download.cgi

and type the following commands to install.

gzip -d httpd-NN.tar.gz tar xvf httpd-NN.tar

./ configure

make

make install

You can read more at How to install Apache on Linux

This may help. I have set it up according to the tutorials given and it worked fine.

share|improve this answer

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.