[Solve] Some yum install problem

Issues related to applications and software problems
Post Reply
ZoisHolic
Posts: 5
Joined: 2017/02/23 08:18:51

[Solve] Some yum install problem

Post by ZoisHolic » 2017/02/23 09:18:22

Hi,
I'm new to CentOS with some question in " yum " this command.
My Server is in a internet environment with CentOS 7.I used my own PC to download packages I need,then transmit files to the Server used USB drive.
But after I used the command "yum clean all" , all the package I put in server cannot install by "yum install xxxxx"

I've search some document, they said it will solve after reset the DNS nameserver. But in my situation this way won't work,because the server is in the intranet.

Can some one help me to solve this problem?
Attachments
test.PNG
test.PNG (55.55 KiB) Viewed 3459 times
Last edited by ZoisHolic on 2017/02/24 07:39:42, edited 1 time in total.

User avatar
TrevorH
Forum Moderator
Posts: 29477
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Some yum install problem

Post by TrevorH » 2017/02/23 10:05:59

If your system cannot reach the internet then you need to either disable the standard repos or you need to point them at a local mirror that your server can reach. To test this you can use yum --disablerepo=\* install /path/to/your.rpm or you can make the change permanent by editing /etc/yum.repos.d/CentOS-Base.repo and change enabled=1 to 0 for all repos listed there (repeat for any other repo files you need to disable).

A more sustainable and longer term solution is to create your own local mirror on a system inside your firewall that your server can reach but that can also reach the internet. Instructions for that can be found on https://wiki.centos.org/HowTos/CreateLocalMirror
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

tunk
Posts: 766
Joined: 2017/02/22 15:08:17

Re: Some yum install problem

Post by tunk » 2017/02/23 14:17:16

You could also try to install them manually: rpm -ivh packagename.rpm
You may run into dependency hell, and I guess keeping the system updated would be inconvenient.

mcheoti
Posts: 36
Joined: 2016/02/13 10:07:42
Location: Austria
Contact:

Re: Some yum install problem

Post by mcheoti » 2017/02/23 18:33:55

Hi,

i for me this looks like an DNS issue.
What happen when you check the /etc/resolv.conf ? Are there some valid DNS Servers ?
cheers
ch

User avatar
TrevorH
Forum Moderator
Posts: 29477
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Some yum install problem

Post by TrevorH » 2017/02/23 18:46:58

He has no internet access.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

ZoisHolic
Posts: 5
Joined: 2017/02/23 08:18:51

Re: Some yum install problem

Post by ZoisHolic » 2017/02/24 06:19:32

Hi all,
thanks for help!
I've tried TrevorH and tunk's solution,they really help,but as what tunk's said , I run into dependency hell . lol
The picture is what I capture while install rpm normally. I used this order to install separately, but lot of dependency problem appear.

How can I solve the dependency problem? I've tried to install all of the packages but didn't work.
Thanks to you guys for help again!

BTW, I find out where the "enable=0" is in the /etc/yum.repos.d/CentOS-Base.repo, but it defalut is 0.
Attachments
test.PNG
test.PNG (27.33 KiB) Viewed 3373 times

User avatar
TrevorH
Forum Moderator
Posts: 29477
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Some yum install problem

Post by TrevorH » 2017/02/24 07:17:10

No, the default for CentOS-Base is not enabled=0, it's 1 for base, updates and extras.

This is exactly why I said that the best solution would be to create a local mirror on a machine that these ones can reach but that does have access to outside. Using yum and a mirror will do dependency resolution for you. Using rpm or yum pointing to an rpm file will not and then you have to do it all yourself though if you know the packages you can put them all in an empty directory and do a yum install /path/to/*.rpm and install them all at once.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

ZoisHolic
Posts: 5
Joined: 2017/02/23 08:18:51

Re: Some yum install problem

Post by ZoisHolic » 2017/02/24 07:38:51

Hi TrevorH
Thanks for kindly help.
I used your suggestion "yum --disablerepo=\* install /path/to/your.rpm " and solve the dependency problem by install 2 packages in one command. lol
My problem was solve now,I'll try the other way you said " yum install /path/to/*.rpm ".
Thanks for your immediately help,and inclusive my poor English.

Hope you guys have a good day.

Post Reply

Return to “CentOS 7 - Software Support”