LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with Yum update-install-list on CentOS 5.2 (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-yum-update-install-list-on-centos-5-2-a-727233/)

reyhaneh.emi 05-20-2009 05:15 AM

problem with Yum update-install-list on CentOS 5.2
 
Hi every body.I already have installed centOs 5.2 on Vmware.It works on a PC and connect to internet via proxy.I want to make rpm packages but it's not possible because RPM-Build package is not installed. So I decided to use yum to download all necessary packages.I configured /etc/repos.d/CentOs-Base.repo es and /etc/yum.conf once and /etc/repos.d/CentOs-Base.repo es and /etc/profile.conf the other time but I got the same error:

Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
http://repo.elastix.org/centos/5/upd...ta/repomd.xml: [Errno 4
]IOError:<urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Error: Cannot open/read repomd.xml filr or repository: elastix-beta

here is my /etc/yum.repos.d/centOS-Base.repo:

# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
baseurl=http://mirror.centos.org/centos/5/os/i386/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
exclude=kernel*

#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
baseurl=http://mirror.centos.org/centos/5/os/i386/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
exclude=kernel*

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
baseurl=http://mirror.centos.org/centos/5/addons/i386/

gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
exclude=kernel*

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
baseurl=http://mirror.centos.org/centos/5/os/i386/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
exclude=kernel*

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
#mirrorlist=http://mirrorlist.centos.org/?release=5&arch=i386&repo=os
baseurl=http://mirror.centos.org/centos/5/os/i386/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

and here my /etc/yum.conf:

[main]
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800
proxy=http://user-proxy:password@myproxy.domain.com:3128/
# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

but I got the above error so thia time I changed /etc/profile.conf and undo the changes in yum.conf but I got the same error.Here is my /etc/profile.conf:

# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

pathmunge () {
if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then
if [ "$2" = "after" ] ; then
PATH=$PATH:$1
else
PATH=$1:$PATH
fi
fi
}

# ksh workaround
if [ -z "$EUID" -a -x /usr/bin/id ]; then
EUID=`id -u`
UID=`id -ru`
fi

# Path manipulation
if [ "$EUID" = "0" ]; then
pathmunge /sbin
pathmunge /usr/sbin
pathmunge /usr/local/sbin
fi

# No core files by default
ulimit -S -c 0 > /dev/null 2>&1

if [ -x /usr/bin/id ]; then
USER="`id -un`"
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
fi

HOSTNAME=`/bin/hostname`
HISTSIZE=1000

if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
INPUTRC=/etc/inputrc
fi

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC

for i in /etc/profile.d/*.sh ; do
if [ -r "$i" ]; then
. $i
fi
done

unset i
unset pathmunge
# The Web proxy server, with the username and password for this account
http_proxy="http://proxy-user:password@myproxy.domain.com:3128"
export http_proxy

and i got the same error:

Loading "installonlyn" plugin
Setting up Update Process
Setting up repositories
http://repo.elastix.org/centos/5/upd...ta/repomd.xml: [Errno 4
]IOError:<urlopen error (-3, 'Temporary failure in name resolution')>
Trying other mirror.
Error: Cannot open/read repomd.xml filr or repository: elastix-beta

I don't know what to do,help me please in configuring yum.
thanks in advance.

lazlow 05-20-2009 11:25 AM

If you check the addresses you have listed you will see they do not exist. Do not try to hard code the addresses. Here is my CentOS-Base.repo file:

Quote:

CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5


baig 05-20-2009 11:35 AM

Edit your /etc/yum.conf

and append proxy server
Code:


http_proxy="http://yourserver:proxy_port"


yourserver= the proxy server
proxy_prot= the port at which your proxy server is configured.


run


edit your
Code:

.bashrc
file in home directory and append
Code:

export http_proxy="http://yourserver:port"
export ftp_proxy="http://yourserver:prot"


Code:

yum clean all
yum update


it had worked for me.


Cheers!!



Cheers!!

reyhaneh.emi 05-23-2009 02:15 AM

I tried your solution.but it didn't work also and the same error occurs. tanx

reyhaneh.emi 05-23-2009 04:56 AM

tanx for your help,I still have the same problem.although i changed /etc/yum.repos.d/CentOs-Base.repo and /bashrc.i also used this command:
yum --enablerepo=\* --disablerepo=c5-media clean all
and i got the same error 3 times.
I also used cat /etc/resolv.conf and pinged my server but no reply.I have no idea of what should i do now.help me please

tanx in advance.


All times are GMT -5. The time now is 07:07 AM.