DavidCoder
Posts: 6
Joined: Wed Oct 09, 2019 1:12 am

Apache Webserver Not Allowing Installs

Wed Oct 09, 2019 1:18 am

Hey, I've been using Raspberry Pi's for about 3 years now, and I just tried to set up a LAMP Web Server on my Pi 4. The problem is, after I install Apache2, I cannot install anything else, it fails to connect. I would really like some help or an answer! Thank you! :)

User avatar
rpdom
Posts: 15591
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache Webserver Not Allowing Installs

Wed Oct 09, 2019 7:23 am

We need a bit more information than that about what you did and how you tried to install Apache.

A standard installation of Apache will not stop anything connecting or prevent installs.

Some general questions (that you should always give the answers to in order to get the best help here):

What model of Raspberry Pi are you using?

What Operating System is it running? Is it the usual Raspbian? If so, from which date and which version?

Have you installed anything non-standard?

How is it connected to the Internet?

DavidCoder
Posts: 6
Joined: Wed Oct 09, 2019 1:12 am

Re: Apache Webserver Not Allowing Installs

Thu Oct 10, 2019 12:42 am

Hey! I am using a Raspberry Pi 4. It is running raspian from the September update. I used a fresh install and controlled it from SSH and there is nothin unusual about it. It is connected to WiFi via Ethernet. Thanks!

User avatar
rpdom
Posts: 15591
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache Webserver Not Allowing Installs

Thu Oct 10, 2019 2:55 am

Thanks for the info :)

What messages do you get when you try to install anything else?

Are you using apt on the command line/terminal, or using the Add/Remove programs menu option?

DavidCoder
Posts: 6
Joined: Wed Oct 09, 2019 1:12 am

Re: Apache Webserver Not Allowing Installs

Thu Oct 10, 2019 10:39 pm

I am using the apt-get install function from the command line and the error message is "no route to host"
Thanks!

Andyroo

Re: Apache Webserver Not Allowing Installs

Thu Oct 10, 2019 10:48 pm

Can you ping google.com or ping 8.8.8.8

I would expect not from your last post.

For some reason you have not got a gateway address or a default route.

Have you set a static IP in dhcpcd.conf by any chance? If so you need to add a line defining where the router is. For example my web server has:

Code: Select all

interface wlan0
static ip_address=192.168.1.11/24
static routers=192.168.1.254
static domain_name_servers=192.168.1.2
hostname = web.local

User avatar
rpdom
Posts: 15591
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Apache Webserver Not Allowing Installs

Fri Oct 11, 2019 2:54 am

"No route to host" suggests that you have a network connection and DNS is at least partially working, but there is a routing issue or the IP address being returned is incorrect.

Could you please post all of the output from the apt-get command, not just the final error message. That will give us more information to go on. (Please use the "Code" button when posting the output, it makes it easier to read). Thanks.

DavidCoder
Posts: 6
Joined: Wed Oct 09, 2019 1:12 am

Re: Apache Webserver Not Allowing Installs

Sun Oct 13, 2019 1:35 am

Hey! I figured out that I had the eth0 and lo interfaces configured incorrectly, I was able to fix them. Thank you so much for helping though!

Return to “Advanced users”