LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   Linux (centos) server yum repository issue (http://www.linuxquestions.org/questions/linux-server-73/linux-centos-server-yum-repository-issue-912781/)

fear_matrix 11-10-2011 04:33 AM

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.

colucix 11-10-2011 04:45 AM

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.

fear_matrix 11-10-2011 05:04 AM

I am trying to install samba and squid too but still i am not getting the package. It is not specifically with php-xml

colucix 11-10-2011 05:19 AM

Quote:

Originally Posted by fear_matrix (Post 4520416)
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?

deep27ak 11-10-2011 05:47 AM

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?

fear_matrix 11-10-2011 06:10 AM

Output
 
Quote:

Originally Posted by deep27ak (Post 4520450)
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

deep27ak 11-10-2011 06:22 AM

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)

fear_matrix 11-10-2011 06:36 AM

Quote:

Originally Posted by deep27ak (Post 4520489)
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

fear_matrix 11-10-2011 06:43 AM

Quote:

Originally Posted by deep27ak (Post 4520489)
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]#

deep27ak 11-10-2011 06:56 AM

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

colucix 11-10-2011 07:36 AM

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.

fear_matrix 11-10-2011 07:41 AM

Quote:

Originally Posted by colucix (Post 4520563)
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.

colucix 11-10-2011 10:14 AM

Quote:

Originally Posted by fear_matrix (Post 4520570)
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.

deep27ak 11-10-2011 10:24 AM

Quote:

Originally Posted by fear_matrix (Post 4520570)
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.

fear_matrix 11-10-2011 10:59 AM

Quote:

Originally Posted by colucix (Post 4520701)
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.


All times are GMT -5. The time now is 01:12 PM.