Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm looking for a way to download a program and all it's
dependencies in the simplest possible way.
File size is not a concern.
It occurs to me that perhaps a bash script controlling
yum or something similar could ID all the rpm's and collect
them in a folder for later use.
Does anyone know if this has been done - or can say why
it can't be done?
This would be very useful for example when (as I am now)
trying to install an application on an offline centos 7 system with
another online system that is centos-6.
Installing the Centos7 repos on the centos6 machine doesn't work as xz then fails on all files...
(I tried that)
If I can get this to happen I can copy the rpm's into my local
repo (now working) on the centos7 machine and install from there.
(hopefully)
Any constructive comments on getting this or an alternate method to work would be very welcome.
Please take the trouble to read the post I made before replying.
Knufl has showed you how to get a list of the dependencies so that the bash script you write knows which dependencies to download.
Your attitude, if I may so, is rather dismissive, particularly coming from someone who used the acronym "TIA", despite forum protocol (which you should take the trouble to read) recommending that text-speak not be used - it is very difficult in particular for our non-native English speakers to know what a lot of acronyms and abbreviations mean. As for the title, I have never seen "dependencies" shortened to "deps" before. I initially thought it referred erroneously to deb (the package format) before opening the thread.
We can all be picky, we can all be dismissive. But we can also choose not to be.
No - your attitude is the problem.
I don't know if you know anything about linux at all but if YOU had bothered to read my post
you would know that his response was totally irrelevant to the question asked.
I refer my previous post to you. Your clicking an irrelevant post as 'helpful' is idiotic and disruptive to
future searches. There are no acronyms or anything confusing for foreign readers of an english
language forum in that post.
As it happens I have just returned to point out to the 239 viewers of the post who didn't
respond that whilst reading the yum man pages to work out how to write the script that I
had discovered the "yumdownloader" program and ask if anyone has used it.
YOUR muddying of this thread now means people will be put off following it and discovering
something they seem not to know.
hydruga
No - your attitude is the problem. I don't know if you know anything about linux at all but if YOU had bothered to read my post you would know that his response was totally irrelevant to the question asked. I refer my previous post to you. Your clicking an irrelevant post as 'helpful' is idiotic and disruptive to future searches. There are no acronyms or anything confusing for foreign readers of an english language forum in that post.
As it happens I have just returned to point out to the 239 viewers of the post who didn't respond that whilst reading the yum man pages to work out how to write the script that I had discovered the "yumdownloader" program and ask if anyone has used it.
YOUR muddying of this thread now means people will be put off following it and discovering something they seem not to know. Well done.
Sorry, no. knudfl gave you a command to use, which you didn't seem to understand/think about. Because (since your goal was writing a shell script), and you were going to read the RPM names and get dependencies. Why couldn't you loop through the results of rpm -qa, run them through the "yum deplist", and then feed that to wget? All shell-scriptable, but it doesn't seem like you thought about that, but were more focused on being snotty to people who are trying to help you, which you have done numerous times in the past.
And add to any of this the INCREDIBLY SIMPLE thought of just pointing wget to a repository location of your choice, and getting all the RPM's with a single command, would indicate that YOU don't know much about Linux. running:
Code:
wget -r -np http://mirror.centos.org/centos/7/
...will get EVERYTHING. That is, ALL the RPM's...that's what you wanted, right??? Or how about just burning the latest 7.4 ISO to a DVD/thumb-drive? Either of those accomplishes your goal of getting the 7.x RPM's and their dependencies to media.
This sentence is the most important part of this post.
LQ should be a place where folks get along to help others to use linux.
In lieu of paying for support, people visit LQ to get some ideas. The ideas come from members who try to offer solutions or alternate solutions to the questions. If someone needs support then they do have an option to purchase a commercial product or support contract.
Members replies ought to be considered a free gift. Some gifts are bozo shoes and some are gold watches.
When members fail to conform to maintaining technical and polite replies or posts to threads, they then get out of hand.
If a members post requires some attention please send a report and let mods look at it.
It is a poor practice to scold members in public and I try to avoid it.
It is also a discouraged practice to close threads but this one has not lived up to polite discussion and transfer of ideas.
goto 20
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.