Post4VPS Forum | Free VPS Provider
apache 2 problem - Printable Version

+- Post4VPS Forum | Free VPS Provider (https://post4vps.com)
+-- Forum: VPS Discussion (https://post4vps.com/Forum-VPS-Discussion)
+--- Forum: VPS Support (https://post4vps.com/Forum-VPS-Support)
+--- Thread: apache 2 problem (/Thread-apache-2-problem)



apache 2 problem - sagher - 01-02-2019

Hi experts. i need urgent help. while installation of apache2 with the following command
Code:
apt-get install apache2
i got this error.
Code:
:~# apt-get install apache2
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:
apache2 : Depends: apache2-bin (= 2.4.37-1) but 2.4.25-3+deb9u5 is to be installed
E: Unable to correct problems, you have held broken packages.
Please sort out this error how to fix it?


RE: apache 2 problem - chanalku91 - 01-02-2019

Try It
```
apt-get autoremove apache2
apt-get purge apache2
apt purge apache2
apt autoremove apache2
```
And
apt-get install apache2


RE: apache 2 problem - sagher - 01-02-2019

(01-02-2019, 09:10 AM)chanalku91 Wrote: Try It
apt-get autoremove apache2
apt-get purge apache2
apt purge apache2
apt autoremove apache2
And
apt-get install apache2

Wow. installed. but stuck at next steps.

:~# apt-get install php
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php

and when try to install php 7

:~# apt-get install php7.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0
E: Couldn't find any package by glob 'php7.0'
E: Couldn't find any package by regex 'php7.0'


please make this fix


RE: apache 2 problem - humanpuff69 - 01-02-2019

(01-02-2019, 09:21 AM)sagher Wrote: Wow. installed. but stuck at next steps.

:~# apt-get install php
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php

and when try to install php 7

:~# apt-get install php7.0
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0
E: Couldn't find any package by glob 'php7.0'
E: Couldn't find any package by regex 'php7.0'


please make this fix
Try apt-get update first . If it doesnt help you probably need to manually add php7.0 repository . Some older linux distro doesnt have php7.0 in their repository


RE: apache 2 problem - Manal - 01-02-2019

Here are the commands you can follow to get PHP7 installed.

Code:
sudo apt-get install python-software-properties software-properties-common
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update

Now you've to purge all the operations and cache proceeded by PHP5 from your machine by following command :-
Code:
sudo apt-get remove php5-common -y
OR
Code:
sudo apt-get purge php5-common -y

Now begin installation of PHP7 with the following command. This includes all required and essential packages for PHP7.
Code:
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y

If that doesn't work, use this.
Code:
sudo apt-get install php7.0



If the error continues, use the following command in order to get the latest PHP modules loaded in your source list.
Code:
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
.

Thank you,
Manal Shaikh.


RE: apache 2 problem - youssefbasha - 01-05-2019

Please make sure that u used
apt-get update
apt-get upgrade
sudo apt install apache2
Chrck this link https://help.ubuntu.com/lts/serverguide/httpd.html


RE: apache 2 problem - chanalku91 - 01-05-2019

Sorry I only use php7.2 for the php problem!

LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
apt-get update
apt-get install php7.2