LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 11-10-2011, 03:33 AM   #1
fear_matrix
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Rep: Reputation: 0
Linux (centos) server yum repository issue


I am trying to install magento in one of the server. So I was trying to install dependencies which are required to run magento smoothly.

So I was trying to install some packages like php-xml but no package was available. But when i use the same command in a different server then it is detecting the package as shown below

Code:
[~]# yum install php-xml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.symnds.com
 * extras: centos.mirror.choopa.net
 * updates: mirror.ash.fastserv.com
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package php-xml available.
Nothing to do
So then i thought it is clearly a repository issue.

So then i came across this URL http://www.magentocommerce.com/boards/viewthread/8980/ which shows how to add repository. But even after adding the repository i had no luck. I am still getting the above error. Please help me on this.
 
Old 11-10-2011, 03:45 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
The php-xml package is provided by the base/updates repositories. You can check if you have some exclude statement in the yum configuration file, /etc/yum.conf. In any case if you run
Code:
yum list <packages names>
in the working server, you can see the name of the repository providing the package, for example:
Code:
Available Packages
php-xml.i686               5.3.2-6.el6_0.1                updates
Hope this helps.
 
Old 11-10-2011, 04:04 AM   #3
fear_matrix
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
I am trying to install samba and squid too but still i am not getting the package. It is not specifically with php-xml
 
Old 11-10-2011, 04:19 AM   #4
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Quote:
Originally Posted by fear_matrix View Post
I am trying to install samba and squid too but still i am not getting the package. It is not specifically with php-xml
Ok. Have you checked the exclude list in /etc/yum.conf (if any)? What is the output of yum list on the working server?
 
Old 11-10-2011, 04:47 AM   #5
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
Before trying yum list run these commands

Code:
#yum clean all

#yum update

#yum list
if possible go to the repository and manually check for all the relative package you are looking for

also post the output of
Code:
#cat /etc/yum.conf
#cat /etc/yum.repos.d/xxx.repo
Which distro are you using?
 
Old 11-10-2011, 05:10 AM   #6
fear_matrix
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Output

Quote:
Originally Posted by deep27ak View Post
Before trying yum list run these commands

Code:
#yum clean all

#yum update

#yum list
if possible go to the repository and manually check for all the relative package you are looking for

also post the output of
Code:
#cat /etc/yum.conf
#cat /etc/yum.repos.d/xxx.repo
Which distro are you using?


cat /etc/yum.conf
[main]
exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mysql* nsd* perl* php* proftpd* pure-ftpd* ruby* spamassassin* squirrelmail*
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1

# Note: yum-RHN-plugin doesn't honor this.
metadata_expire=1h

installonly_limit = 5

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d


[/etc/yum.repos.d]# ls
./ ../ CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo remi-enterprise.repo



[remi]
name=Les RPM de remi pour Enterpise Linux $releasever - $basearch
baseurl=http://rpms.famillecollet.com/el$releasever.$basearch/
http://remi.collet.free.fr/rpms/el$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
failovermethod=priority

[remi-test]
name=Les RPM de remi en test pour Enterpise Linux $releasever - $basearch
baseurl=http://remi.collet.free.fr/rpms/test-el$releasever.$basearch/
# http://iut-info.univ-reims.fr/remirpms/test-el$releasever.$basearch/
enabled=0
gpgcheck=1
gpgkey=http://rpms.famillecollet.com/RPM-GPG-KEY-remi
 
Old 11-10-2011, 05:22 AM   #7
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
I think in your *.repo

Code:
enabled=0

should be

enabled=1
Did you tried those commands?

after making changes in .repo file don't forget to
Code:
#yum clean all
#yum update
and try running
Code:
#yum install (package_name)
 
Old 11-10-2011, 05:36 AM   #8
fear_matrix
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by deep27ak View Post
I think in your *.repo

Code:
enabled=0

should be

enabled=1
Did you tried those commands?

after making changes in .repo file don't forget to
Code:
#yum clean all
#yum update
and try running
Code:
#yum install (package_name)

I am trying it deepak.....will let you know the output
 
Old 11-10-2011, 05:43 AM   #9
fear_matrix
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by deep27ak View Post
I think in your *.repo

Code:
enabled=0

should be

enabled=1
Did you tried those commands?

after making changes in .repo file don't forget to
Code:
#yum clean all
#yum update
and try running
Code:
#yum install (package_name)

Please find the below output. I have enabled it and it seems to be working, but then i am getting this below error


[/etc/yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning up Everything
Cleaning up list of fastest mirrors
root@sec[/etc/yum.repos.d]# yum update
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirrors.lga7.us.voxel.net
* extras: mirror.trouble-free.net
* remi: rpms.famillecollet.com
* updates: mirror.us.leaseweb.net
base | 1.1 kB 00:00
base/primary | 961 kB 00:00
base 2705/2705
extras | 2.1 kB 00:00
extras/primary_db | 156 kB 00:00
remi | 2.5 kB 00:00
remi/primary_db | 265 kB 00:00
http://remi.collet.free.fr/rpms/test...ta/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: remi-test. Please verify its path and try again
root@sec[/etc/yum.repos.d]# yum install php-xml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.lga7.us.voxel.net
* extras: mirror.trouble-free.net
* remi: rpms.famillecollet.com
* updates: mirror.us.leaseweb.net
http://remi.collet.free.fr/rpms/test...ta/repomd.xml: [Errno 4] IOError: <urlopen error (-2, 'Name or service not known')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: remi-test. Please verify its path and try again
root@sec[/etc/yum.repos.d]#
 
Old 11-10-2011, 05:56 AM   #10
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
It seems yum is unable to retrieve the packages from repository

just check for the baseurl whether you can access all the packages manually on a browser

http://remi.collet.free.fr/rpms/test-el$releasever.$basearch/

and make sure proper repomd.xml file is present there
 
Old 11-10-2011, 06:36 AM   #11
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
First problem: the exclude list in your /etc/yum.conf
Code:
exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mysql* nsd* perl* php*
will actually exclude all the php packages and much other stuff. Is there a reason why this list has been added to yum.conf?

Second problem: the path to the repository is indeed wrong. Take a look at http://rpms.famillecollet.com/ and download/install the proper RPM, remi-release-6.rpm or remi-release-5.rpm depending on your CentOS release.
 
Old 11-10-2011, 06:41 AM   #12
fear_matrix
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
First problem: the exclude list in your /etc/yum.conf
Code:
exclude=apache* bind-chroot courier* dovecot* exim* filesystem httpd* mod_ssl* mysql* nsd* perl* php*
will actually exclude all the php packages and much other stuff. Is there a reason why this list has been added to yum.conf?

Second problem: the path to the repository is indeed wrong. Take a look at http://rpms.famillecollet.com/ and download/install the proper RPM, remi-release-6.rpm or remi-release-5.rpm depending on your CentOS release.

Hi Deepak,

As per this URL (http://www.magentocommerce.com/boards/viewthread/8980/) i have configured. Or do you have the correct repo URL which i can use which can solve my problem.
 
Old 11-10-2011, 09:14 AM   #13
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,458

Rep: Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941Reputation: 1941
Quote:
Originally Posted by fear_matrix View Post
As per this URL (http://www.magentocommerce.com/boards/viewthread/8980/) i have configured. Or do you have the correct repo URL which i can use which can solve my problem.
That thread is about 3 years old. Things may have changed. It appears the repository you're looking for has changed to the one mentioned above. Also check (or remove if not necessary anymore) the exclude list from your yum.conf otherwise you won't be able to install the required dependencies.
 
Old 11-10-2011, 09:24 AM   #14
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,188
Blog Entries: 4

Rep: Reputation: 219Reputation: 219Reputation: 219
Quote:
Originally Posted by fear_matrix View Post
Hi Deepak,

As per this URL (http://www.magentocommerce.com/boards/viewthread/8980/) i have configured. Or do you have the correct repo URL which i can use which can solve my problem.
it is not a good option to configure yum on your machine using any repository url which you get on any random blog
if you are in any organization contact your admin to provide you with the address of repository or you need to create one by your self

may be I can help you with that.
 
Old 11-10-2011, 09:59 AM   #15
fear_matrix
LQ Newbie
 
Registered: Dec 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
That thread is about 3 years old. Things may have changed. It appears the repository you're looking for has changed to the one mentioned above. Also check (or remove if not necessary anymore) the exclude list from your yum.conf otherwise you won't be able to install the required dependencies.
Got your point. But now the big question is that the default repository is not helping out and i need to install many magento dependenies which usually deals with installing many php plugins using YUM

I have a second machine and in that server i was able to install magento and its dependecies without any issues using YUM. I have compared the default repo file in both the machine and everything is same.
 
  


Reply

Tags
centos, linux, yum


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS 5.2 yum repository error - Please help tezarin Linux - Software 7 01-07-2009 12:18 PM
LXer: Creating A Local Yum Repository (CentOS) LXer Syndicated Linux News 0 06-18-2007 07:01 AM
Redhat AS server upgrade via Yum using CentOS repository? yilang Red Hat 1 04-15-2006 10:02 PM
CentOS' YUM repository not updating? guest cAos 3 03-19-2005 03:57 AM
after updating RHEL AS 4 w/ CentOS' YUM repository.... guest cAos 2 03-17-2005 10:53 PM


All times are GMT -5. The time now is 11:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration