How to install apache2 in Ubuntu - apache

I am trying to install apache2 in Ubuntu 12. I installed Ubuntu in Virtual Machine. I have problems. First, my system can not update or upgrade. When I type:
I receive a lot of errors like this:
Err http://security.ubuntu.com quantal-security/main Sources
404 Not Found [IP: 91.189.91.14 80]
At the final line, this is the result:
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
Second, when I try to install apache2. I type:
sudo apt-get install apache2 apache2-doc apache2-utils
Again, it fails. The result:
e#ubuntu:/etc$ sudo apt-get install apache2 apache2-doc apache2-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2
E: Unable to locate package apache2-doc
E: Unable to locate package apache2-utils
e#ubuntu:/etc$
Can you help me plz?
EDIT:
This command does not work either.
sudo apt-get update && sudo apt-get upgrade
I get:
W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/quantal-backports/multiverse/binary-i386/Packages 404 Not Found [IP: 91.189.91.24 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

The problem is with the OS installation.
use sudo apt-get update && sudo apt-get upgrade. If ou cannot update. Then try to re-install the OS.
After a fresh install of your OS try sudo apt-get install apache2 apache2-doc apache2-utils

Related

sudo apt update not working on windows subsystem

I have installed ubuntu for windows subsystem for linux. I can run bash scripts and run basic commands like ls, etc.
Problem is I cannot run sudo apt update or sudo apt-get update. Cannot install packages ike ruby, pip. I get errors similar to below:
Err:3 http://security.ubuntu.com/ubuntu xenial-security Release
Connection failed [IP: 91.189.91.26 80]
How can these errors be resolved. Any help appreciated.

Install mono on Centos7

I use this steps to install mono on Centos7 and it worked for me for days.
mkdir /mono
wget http://download.mono-project.com/repo/xamarin.gpg -P /mono
rpm --import /mono/xamarin.gpg
yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
yum install -y mono-complete
And now it keeps failing and can't install mono:
failure: repodata/bd6e4ea2b820dd6b71fd4fca044931e043e411cc2ba8e362b8249951474224b6-primary.sqlite.bz2 from download.mono-project.com_repo_centos_: [Errno 256] No more mirrors to try.
http://download.mono-project.com/repo/centos/repodata/bd6e4ea2b820dd6b71fd4fca044931e043e411cc2ba8e362b8249951474224b6-primary.sqlite.bz2: [Errno 14] HTTP Error 404 - Not Found
Is there a problem with the repository right now? Or should i install it from a different source?
It's a Centos7 host running on Azure in the North Europe region.
Just follow the steps below to install mono done
yum-config-manager --add-repo http://download.mono-project.com/repo/centos-beta/
yum repolist
and finally
yum install -y mono-complete
Install Mono

Facing error while installing Apache2 in Ubuntu 14.04 'has no installation candidate'

I don't know what I did but I'm not able to install apache2 in my Ubuntu 14.04.
When I use sudo apt-get install apache2 I face this error.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package apache2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libapache2-mpm-itk:i386 libapache2-mpm-itk
E: Package 'apache2' has no installation candidate
First make sure that your proxy is disabled as that can cause a problem sometimes.
Then run the following.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install apache2
If that doesn't work you can always compile your own apache2. A tutorial for that is located here: https://www.virgohacks.net/install-apache-2-4-mysql-5-6-php-5-5-source-ubuntu-14-04/
Good luck

Apache 2 instalation / Ubuntu 13.04 - Package not found

No matter what I do I cannot get the package installed :
sudo su
apt-get update
apt-get upgrade
apt-get install apache2
..though my computer is telling me ...
The program 'apache2' can be found in the following packages:
* apache2-mpm-event
* apache2-mpm-prefork
* apache2-mpm-worker
* apache2-mpm-itk
Try: sudo apt-get install
When I do this ... for instance with
root#xxxx:/home/fakler# apt-get install apache2-mpm-prefork
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apache2-mpm-prefork
pt-get update shows me many errors like that ...
Err http://security.ubuntu.com raring-security/main i386 Packages
404 Not Found [IP: 91.189.92.201 80]
Tried also installing Apache from here :
https://apps.ubuntu.com/cat/applications/raring/apache2.2-common/
but hitting click on the button available on the Software centre does not wor either (Nothing happens).
Someone has an idea ? Thanks.
Well, I could figure it out myself. Somewhere in Ubuntu, forgotten where, I just found it, there is an option where You can allow the user - Yourself - what are the reliable ressources for software upgrade/download. I did confirm that I allow download from the official Ubuntu ressources/servers as well as canonical software, third party software etc. I did also allow access / updates/installs from my CD Rom drive. After that, I could do the Apache 2 installation.

cannot install libapache2-mod-fcgid apache mod

hello i trying to install libapache2-mod-fcgid mod but have always get error.
root#mail:~# sudo apt-get install libapache2-mod-fcgid
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libapache2-mod-fcgid : Depends: apache2.2-common but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
and without fcgid mod i cannot launch apache server
root#mail:~# service apache2 restart
* Restarting web server apache2 [fail]
* The apache2 configtest failed.
Output of config test was:
apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/fcgid.load: Cannot load /usr/lib/apache2/modules/mod_fcgid.so into server: /usr/lib/apache2/modules/mod_fcgid.so: cannot open shared object file: No such file or directory
Action 'configtest' failed.
The Apache error log may have more information.
apache version 2.4
This worked for me: Ubuntu 21.10 in year 2022:
sudo apt-get install -y libapache2-mod-fcgid
I know it is a bit late for a response but, since there is no answer yet, I'll put one.
In this situation, the dependencies from libapache2-mod-fcgid are not met. In this case, you could download and install apache2.2-common prior the installation of libapache2-mod-fcgid like this:
sudo apt-get install apache2.2-common
and then try your install command afterward.