# CentOS Cannot Install or Download Anything



## Ascendancy (Jul 19, 2006)

I have just reformatted with a new install of CentOS 5, and I have been having some problems with being able to install Apache, MySQL, PHP, or really anything I've tried. I have configured my Firefox to run through a proxy server, as the computer is set up at my high school an is running through a Windows ISA Server. So I can get out to the internet on Firefox, but whenever I try to run anything (such as "yum update"), I get the following error message:


```
http://mirror.centos.org/centos/5/os/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (111, 'Connection refused')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
```
I am not sure what would cause this, but I am guessing it is beacuse my internet connection is run through a proxy server, and I have no idea where to go to fix the settings. I have already configured firefox with the proxy settings and it gets out fine, but do I need to go somewhere else to fix the entire internet connection, which would also fix this error? 

I am a newbie to Linux, so if I am wrong with my assumption and the error is caused by someting else, please let me know. Thanks for any help in advance!


----------



## wmorri (May 29, 2008)

Hi,

First thing is that you have to be in root to run yum update. To do this type:

```
su yum update
password:
```
Also, take a look at this tutorial from Howtoforge.com. Apache and centOS5. You can disregard the bind part if you don't want to install it. The rest is pretty straight forward.

Cheers!


----------



## Ascendancy (Jul 19, 2006)

Even running the command as root gives me the same error, saying that it cannot connect to download anything.


----------



## wmorri (May 29, 2008)

Hi,

Have you done an update as I recommended in my last post? If so can you post the error that it is giving you from running at root.

Cheers!


----------



## Ascendancy (Jul 19, 2006)

Hey wmorri,

I tried your code, but it says that there is no user as "yum". I think you meant to type "su root yum update", which I tried instead and got this error message:


```
/usr/bin/yum: line 2: import: command not found
/usr/bin/yum: line 3: try:: command not found
/usr/bin/yum: line 4: import: command not found
/usr/bin/yum: line 5: except: command not found
/usr/bin/yum: yum: line 23: syntax error near unexpected token `('
/usr/bin/yum: yum: line 23: `""" % (sys.exc_value, sys.version)'
```
Let me know if this makes any sense.


----------



## wmorri (May 29, 2008)

Hi,

This makes sense to me. It just goes to show me that I should try it on my own computer before I tell others to try. I should have told you to try this instead

```
su
password:
[[email protected] of pc user]# yum update
```
Cheers!


----------



## Ascendancy (Jul 19, 2006)

I tried that and it didn't seem to work, but I have good news! I was checking around in CentOS to see if I could find any network or proxy settings dialog, and I did find something under System>Preferences>Network proxy. I just set that value to the proxy server that the network runs through and viola! I'm finally able to run yum update with no errors now, so things are looking good. Thanks for your help!


----------



## wmorri (May 29, 2008)

Hi,

Great to hear that you have fixed your own problems. Please mark this thread as solved in the thread tools in the top right of the page. This will help us to know that we can move on to other threads. Please stick around and help out when you can too.

Cheers!


----------

