Ask Your Question
1

Installing required dependencies for software

asked 2019-01-14 08:26:56 -0600

Sensei Freak gravatar image

Hi I've been sitting with this issue for a while now and can't seem to get past it at all...

I've got a client that decided to go to fedora for all of there business things and it has been a headache for me ever since. I had to play catch up a lot and had to learn linux from scratch.

In any case my issue is that I need to install or update hplip and hplip-gui on a set of there computers that is not allowed to be connected to the Internet, this has been a challenge and a half for me hplip had quite a few dependencies that needs to be installed with hplip that it automatically downloads when installing. I've went and downloaded all that and all of those dependencies of those dependencies, but I'm stuck in a stupid loop where some dependencies deeds some of the other dependencies to be installed and then those dependencies needed the initial dependency to be installed so i don't know how to move on from this. I've went through quite a few forums and tried various things when running the command for installing it but I still can't get past it.

Please help I'm currently working on installing hplip-gui and it seems its going to have a huge list of dependencies for dependencies and I don't want to sit with the same issue as with hplip installation where i can't move forward after doing all the effort of tracking down all the required files.

If there is more info needed please let me know and I'll do my best at redoing the installation and posting where I'm having issues installing what.

edit retag flag offensive close merge delete

Comments

1

@Sensei Freak -> What about -> in the internet box execute sudo dnf install hplip-gui --downloadonly --destdir=/save/to/dir and in the rest box sudo dnf install *.rpm in the place you copy this packages

hhlp gravatar imagehhlp ( 2019-01-14 09:00:45 -0600 )edit

It gets worse: Fedora have very frequent updates, and without Internet connection it would be a real pain.

villykruse gravatar imagevillykruse ( 2019-01-14 10:57:07 -0600 )edit

I've never done it myself, but if you need to support and update a bunch of Fedora computers, and if you can provide one computer/server with Internet access, maybe you can make it a sort of intranet repo mirror for all the other computers. There are means to do that, though again, I never tried it myself.

Night Romantic gravatar imageNight Romantic ( 2019-01-15 01:07:17 -0600 )edit

The dnf-plugins-core provides the reposync subcommand which should be able to clone a fedora repository.

NAME
       dnf.plugin.reposync - DNF reposync Plugin

       Synchronize packages of a remote DNF repository to a local directory.

SYNOPSIS
       dnf reposync [options]

DESCRIPTION
       reposync  makes  local copies of remote repositories. Packages that are already present in the local
       directory are not downloaded again.

...
villykruse gravatar imagevillykruse ( 2019-01-15 03:01:01 -0600 )edit

I'm not to worried about the Fedora updates as there are strict policies in place as to what can be plugged in and installed on these stand alone PC's, and its mostly not needed at this point. @hhlp Thanks I'll try that and get back

Sensei Freak gravatar imageSensei Freak ( 2019-01-15 03:31:24 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-15 08:44:26 -0600

Sensei Freak gravatar image

So I've got as far as getting the files that dnf uses to look at when searching for updates and so on. I've tried to change the 'baseurl' to a local dir that I created. I've looked at answers that create your own local repo but I need to download and install "createrepo" which I can not do in the first place because I'm working on a workstation of Fedora that I disabled the internet for testing issues that come up at the client.

So I've changed the 'baseurl' to a local dir that I made to work out of in the file under /etc/yum.repos.d/ , made a copy of the files "fedora.repo" and " fedora-updates.repo" and changed the basueurl in both of them to the local dir. Having no luck keeps saying the following: Repository updates-source has no mirror or baseurl set. Error: failed to synchronize cache for repo 'updates'

Any help to setup it in a way so that I can install the needed packages, for hplip or hplip-gui and potentially other issues that need the same work through, completely offline because I've got no access to the internet for this.

I'm using the answer as a comment was to short for this. Please ask if i need to provide more info on what I changed exactly.

edit flag offensive delete link more

Comments

I think some sort of local repo is the correct way to solve this problem, it seems it's not that hard to do. I think you can manually add to it just the packages you need (i.e. hplip-gui with all of it's dependencies) or you can make a local mirror with reposync.

Check here and here for some tips. More resources are available on "dnf create local repo" google search.

Night Romantic gravatar imageNight Romantic ( 2019-01-16 00:42:46 -0600 )edit

Don't make copies of fedora's repo files, make your own, examples are in the links.

Night Romantic gravatar imageNight Romantic ( 2019-01-16 00:43:19 -0600 )edit

There's also manual way you can try (without local repo), I definitely like it less, but technically it works. You can resolve all the dependencies once, download all the packages you need in some folder (you've already done it presumably). Then you can make file like install_hplip-gui.sh in the same directory as all the rpms

#!/bin/sh
dnf install \
./hplip-gui_XXX_.rpm \
./other_package_you_need_XXX_.rpm \
./one_more_dependency_XXX_.rpm

You have to name all the dependencies you need in this file. You can use something like "ls -1 > my_list.txt" to make a list.

Night Romantic gravatar imageNight Romantic ( 2019-01-16 00:54:16 -0600 )edit

Basically it tells dnf install all the files you name from the current directory. If all the dependencies are in this directory it will succeed (if not it'll tell what are you missing).

Once it's tested and works, it'll work on any machine -- provided it has all the dependencies, again, and that other machines are in the same state regarding installed package version's and such.

But still I think local repo -- maybe with just the packages you need -- will be far easier to use and maintain.

Night Romantic gravatar imageNight Romantic ( 2019-01-16 00:59:34 -0600 )edit

I can't do the local repo as they explain because I need to download createrepo witch I can not do so it won't work. I've tried the Manual way but it keeps telling me the 'repository update-source has no mirror or basurl set' and 'Error: Failed to synchronize cache for repo 'updates''

Sensei Freak gravatar imageSensei Freak ( 2019-01-17 01:51:16 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-01-14 08:23:50 -0600

Seen: 77 times

Last updated: Jan 15