How to upgrade system packages offline?

I no have internet on computer. I download a package f35 from internet.
how upgrade it?

# dnf upgrade ./file*.rpm

i get

[…]
Całkowity rozmiar: 3.1 M
Całkowity rozmiar pobierania: 3.0 M
W porządku? [t/N]: t
Pobieranie pakietów:
[=== ] — B/s | 0 B --:-- ETA
Pobrane pakiety zostały zapisane w pamięci podręcznej do czasu następnej pomyślnej transakcji.
Można usunąć pakiety z pamięci podręcznej wykonując polecenie „dnf clean packages”.
Błąd: Błąd podczas pobierania pakietów:
Curl error (6): Couldn’t resolve host name for https_//mirrors_fedoraproject_org/metalink?repo=updates-released-f35&arch=x86_64 [Could not resolve host: mirrors_fedoraproject_org]

dnf clean noting happened 0 packages clean.
I’m no have internet on this machine.

Hej :wink:
dnf couldn’t access repositories, hence the process failed, you can make dnf use only what’s dowloaded by adding --disablerepo=*.
If those packages are supposed to install a new program (not upgrade already installed one), you need to use dnf install instead of dnf upgrade.

An off-line install may fail if you don’t have all necessary dependencies, here’s how to use dnf to get required RPMs on an on-line system:

Of course you need to adjust commands for your case (--releasever=35, install/upgrade, etc.).

2 Likes

Still I cant install update my system:

dnf install -y --best --disablerepo=* ./audacity-3.0.2-5.fc35.x86_64.rpm

Błąd:
Problem: sprzeczne żądania

  • nic nie dostarcza libid3tag.so.0()(64bit) wymaganego przez audacity-3.0.2-5.fc35.x86_64
  • nic nie dostarcza libsuil-0.so.0()(64bit) wymaganego przez audacity-3.0.2-5.fc35.x86_64
  • nic nie dostarcza portaudio(x86-64) >= 19-16 wymaganego przez audacity-3.0.2-5.fc35.x86_64
    (dodanie „–skip-broken” pominie pakiety, których nie można zainstalować)

How install update package from disk with dependencies?
I trying

dnf localinstall --disablerepo=* -y ./audacity-3.0.2-5.fc35.x86_64.rpm

system found dependencies and … still need mirror repo

(Niestety ziomek nadal nie działa)

sudo dnf download audacity --resolve --downloaddir /myupdatesgohere

Will download audacity with the dependencies needed on the machine your downloading on to the directory specified, as long as they’re relatively the same this should work.

or
sudo dnf download audacity --resolve --alldeps --downloaddir /myupdatesgohere

Will download audacity with all the dependencies needed to the directory specified.

Then you should be able to install with sudo dnf install /myupgradesgohere/*.rpm

I’d try without alldeps first.

edit: Depending on how your offline installation differs from the online one this will install extra dependencies especially if you use alldeps.

1 Like

dnf download audacity --resolve --alldeps --downloaddir …
download ALL FILES dependencies on system not only audacity.
I have downloaded all necesary file in my directory

I wrote what happenes when dnf install audacity (and dep files audacity).

Please for everyone. Please create a Virtualbox , qemu and TRY your idea before post this here. I have real problem.

I get this error again

#dnf install ./*.rpm

Pakiet setup-2.13.9.1-2.fc35.noarch jest już zainstalowany.
Pakiet shadow-utils-2:4.9-9.fc35.x86_64 jest już zainstalowany.
Pakiet shared-mime-info-2.1-3.fc35.x86_64 jest już zainstalowany.
Pakiet sord-0.16.8-2.fc35.x86_64 jest już zainstalowany.
Pakiet sound-theme-freedesktop-0.8-16.fc35.noarch jest już zainstalowany.
Pakiet soundtouch-2.3.1-1.fc35.x86_64 jest już zainstalowany.
Pakiet soxr-0.1.3-10.fc35.x86_64 jest już zainstalowany.
Pakiet sqlite-libs-3.36.0-3.fc35.x86_64 jest już zainstalowany.
Pakiet sratom-0.6.6-3.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-libs-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-networkd-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-pam-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-resolved-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-udev-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet totem-pl-parser-3.26.6-3.fc35.x86_64 jest już zainstalowany.
Pakiet tpm2-tss-3.1.0-3.fc35.x86_64 jest już zainstalowany.
Pakiet tracker-3.2.1-1.fc35.x86_64 jest już zainstalowany.
Pakiet tracker-miners-3.2.2-1.fc35.x86_64 jest już zainstalowany.
Pakiet trousers-0.3.15-4.fc35.x86_64 jest już zainstalowany.
Pakiet trousers-lib-0.3.15-4.fc35.x86_64 jest już zainstalowany.
Pakiet twolame-libs-0.3.13-18.fc35.x86_64 jest już zainstalowany.
Pakiet tzdata-2021e-1.fc35.noarch jest już zainstalowany.
Pakiet uchardet-0.0.6-14.fc35.x86_64 jest już zainstalowany.
Pakiet upower-0.99.13-1.fc35.x86_64 jest już zainstalowany.
Pakiet util-linux-2.37.4-1.fc35.x86_64 jest już zainstalowany.
Pakiet util-linux-core-2.37.4-1.fc35.x86_64 jest już zainstalowany.
Pakiet vamp-plugin-sdk-2.9.0-4.fc35.x86_64 jest już zainstalowany.
Pakiet which-2.21-27.fc35.x86_64 jest już zainstalowany.
Pakiet whois-nls-5.5.12-1.fc35.noarch jest już zainstalowany.
Pakiet xkeyboard-config-2.33-2.fc35.noarch jest już zainstalowany.
Pakiet xml-common-0.6.3-57.fc35.noarch jest już zainstalowany.
Pakiet xz-5.2.5-7.fc35.x86_64 jest już zainstalowany.
Pakiet xz-libs-5.2.5-7.fc35.x86_64 jest już zainstalowany.
Pakiet zlib-1.2.11-30.fc35.x86_64 jest już zainstalowany.
Błąd:
Problem 1: problem z zainstalowanym pakietem fedora-release-identity-workstation-35-36.noarch

  • pakiet fedora-release-identity-workstation-35-36.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-basic-35-36.noarch
  • pakiet fedora-release-identity-basic-35-36.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-workstation-35-36.noarch
  • pakiet fedora-release-identity-workstation-35-33.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-basic-35-36.noarch
  • pakiet fedora-release-identity-basic-35-36.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-workstation-35-33.noarch
  • sprzeczne żądania
    Problem 2: problem z zainstalowanym pakietem pipewire-jack-audio-connection-kit-0.3.49-1.fc35.x86_64
  • pakiet pipewire-jack-audio-connection-kit-0.3.49-1.fc35.x86_64 jest sprzeczny z jack-audio-connection-kit dostarczanym przez jack-audio-connection-kit-1.9.19-1.fc35.x86_64
  • pakiet pipewire-jack-audio-connection-kit-0.3.38-1.fc35.x86_64 jest sprzeczny z jack-audio-connection-kit dostarczanym przez jack-audio-connection-kit-1.9.19-1.fc35.x86_64
  • sprzeczne żądania
    (dodanie „–allowerasing” do wiersza poleceń zastąpi sprzeczne pakiety lub „–skip-broken” pominie pakiety, których nie można zainstalować)

please everybody. check your answer in virtualbox or qemu BEFORO you answer

this same error
dnf localinstall ./k/audacity-3.0.2-5.fc35.x86_64.rpm

Pakiet serd-0.30.10-3.fc35.x86_64 jest już zainstalowany.
Pakiet setup-2.13.9.1-2.fc35.noarch jest już zainstalowany.
Pakiet shadow-utils-2:4.9-9.fc35.x86_64 jest już zainstalowany.
Pakiet shared-mime-info-2.1-3.fc35.x86_64 jest już zainstalowany.
Pakiet sord-0.16.8-2.fc35.x86_64 jest już zainstalowany.
Pakiet sound-theme-freedesktop-0.8-16.fc35.noarch jest już zainstalowany.
Pakiet soundtouch-2.3.1-1.fc35.x86_64 jest już zainstalowany.
Pakiet soxr-0.1.3-10.fc35.x86_64 jest już zainstalowany.
Pakiet sqlite-libs-3.36.0-3.fc35.x86_64 jest już zainstalowany.
Pakiet sratom-0.6.6-3.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-libs-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-networkd-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-pam-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-resolved-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet systemd-udev-249.9-1.fc35.x86_64 jest już zainstalowany.
Pakiet totem-pl-parser-3.26.6-3.fc35.x86_64 jest już zainstalowany.
Pakiet tpm2-tss-3.1.0-3.fc35.x86_64 jest już zainstalowany.
Pakiet tracker-3.2.1-1.fc35.x86_64 jest już zainstalowany.
Pakiet tracker-miners-3.2.2-1.fc35.x86_64 jest już zainstalowany.
Pakiet trousers-0.3.15-4.fc35.x86_64 jest już zainstalowany.
Pakiet trousers-lib-0.3.15-4.fc35.x86_64 jest już zainstalowany.
Pakiet twolame-libs-0.3.13-18.fc35.x86_64 jest już zainstalowany.
Pakiet tzdata-2021e-1.fc35.noarch jest już zainstalowany.
Pakiet uchardet-0.0.6-14.fc35.x86_64 jest już zainstalowany.
Pakiet upower-0.99.13-1.fc35.x86_64 jest już zainstalowany.
Pakiet util-linux-2.37.4-1.fc35.x86_64 jest już zainstalowany.
Pakiet util-linux-core-2.37.4-1.fc35.x86_64 jest już zainstalowany.
Pakiet vamp-plugin-sdk-2.9.0-4.fc35.x86_64 jest już zainstalowany.
Pakiet which-2.21-27.fc35.x86_64 jest już zainstalowany.
Pakiet whois-nls-5.5.12-1.fc35.noarch jest już zainstalowany.
Pakiet xkeyboard-config-2.33-2.fc35.noarch jest już zainstalowany.
Pakiet xml-common-0.6.3-57.fc35.noarch jest już zainstalowany.
Pakiet xz-5.2.5-7.fc35.x86_64 jest już zainstalowany.
Pakiet xz-libs-5.2.5-7.fc35.x86_64 jest już zainstalowany.
Pakiet zlib-1.2.11-30.fc35.x86_64 jest już zainstalowany.
Błąd:
Problem 1: problem z zainstalowanym pakietem fedora-release-identity-workstation-35-36.noarch

  • pakiet fedora-release-identity-workstation-35-36.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-basic-35-36.noarch
  • pakiet fedora-release-identity-basic-35-36.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-workstation-35-36.noarch
  • pakiet fedora-release-identity-workstation-35-33.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-basic-35-36.noarch
  • pakiet fedora-release-identity-basic-35-36.noarch jest sprzeczny z fedora-release-identity dostarczanym przez fedora-release-identity-workstation-35-33.noarch
  • sprzeczne żądania
    Problem 2: problem z zainstalowanym pakietem pipewire-jack-audio-connection-kit-0.3.49-1.fc35.x86_64
  • pakiet pipewire-jack-audio-connection-kit-0.3.49-1.fc35.x86_64 jest sprzeczny z jack-audio-connection-kit dostarczanym przez jack-audio-connection-kit-1.9.19-1.fc35.x86_64
  • pakiet pipewire-jack-audio-connection-kit-0.3.38-1.fc35.x86_64 jest sprzeczny z jack-audio-connection-kit dostarczanym przez jack-audio-connection-kit-1.9.19-1.fc35.x86_64
  • sprzeczne żądania
    (dodanie „–allowerasing” do wiersza poleceń zastąpi sprzeczne pakiety lub „–skip-broken” pominie pakiety, których nie można zainstalować)

Let’s be nicer to folks taking the time to help us out :slight_smile:

That would usually work, but in this case, because we’ve downloaded all deps and it’s a different machine that we want to install on dep resolution causes conflicts etc.

The best way, which should always work, is to create a local repository so that dnf has access to all the information it needs and can then do what it needs on any machine.

So we:

  • download all the required packages with their deps (you’ve already done this)
  • create a repository in the folder by running createrepo in it (once done, you’ll see a repodata folder has been created in the folder)
  • write a repo config file (based on the files in /etc/yum.repos.d/ it’ll be something like this):
[local]
name=local repo
baseurl=file:///path/to/folder/with/repodata/folder/and/rpms
enabled=0
gpgcheck=0
repo_gpgcheck=0
  • copy the folder and repo file to the other computer
  • check that the path in your repo file is correct, and update it as necessary
  • put the repo file in /etc/yum.repos.d/local.repo
  • install with dnf --disablerepo=* --enablerepo=local audacity

PS: can you please run your commands with LANG=C dnf .. so that the output is in English, just to make it easier for folks on the forum?

1 Like

dnf - C will tell dnf to only use local, cached information rather than looking to the network. If what you have locally is sufficient, this should work — but it will fail if you don’t have everything dnf needs.

You can also go a level below dnf, to the underlying rpm tool:

rpm -Uvh file*.rpm

should do it — at least, if all of file*.rpm can be installed or upgraded without any other package updates.

1 Like

In that case you can download missing packages:
dnf install libid3tag libsuil* portaudio with --downloadonly, etc.
dnf should find the right package, you can also use it to check what provides the missing library:
dnf repoquery --whatprovides libsuil*

Audacity is also available in a ~portable form - AppImage (quick and easy to download and run):

Nie bądź Januszem :wink: We’re just helping voluntarily.
On a serious note, those issues could stem form what you’re installing and what you’ve got on your off-line and on-line systems - not necessarily reproducible in a VM.
On the other hand, USB booted live-system or fresh VM should be good for you to download RPMs, as it will get all dependencies and updates that a fresh system would need to install required package.

do ankursinha do ozeszty
But these people are not helping me. They write something that doesn’t work. Would you like me to thank people who lie and mislead others because they didn’t bother to check if what they write is true?
(Będę Januszem, bo chciałbym by taka aktualizację zrobiła babcia i bym mógł ją poprowadzić za rączkę przez telefon co i jak. Twoje jak i innych pomysły nie działają. Po prostu piszecie co wam się wydaje ale nie sprawdziliście czy to działa. Ja pokazuję błędy i pisze ze nei działa ale nie dociera ;( cieszę się, że ktoś pisze, ale co z tego jak nie pisze z sensem)

at all:
Unfortunately again none of your suggestions work.

@mattdm Your idea work but I must know what files i need
localy repo is not good because my computer sometimes have internet but sometimes dont have (for a week for example)

I am trying to write a scenario on how to use a computer in a situation like in Ukraine. Electricity is sometimes there, internet is sometimes there, but not always. There is also not always access to repositories. No one will ever guarantee that all resources will always be available if this war lasts more than 10 years.

do ozeszty: The idea of giving all repositories manually is weak. What if there are 300 dependencies? Will he list them all?

i second

dnf repoquery --whatprovides ./k/minimodem-0.24-12.fc35.x86_64.rpm
Fedora 35 - x86_64 - Updates 0.0 B/s | 0 B 00:00
Errors during downloading metadata for repository ‘updates’:

  • Curl error (6): Couldn’t resolve host name for mirrors fedoraproject org/metalink?repo=updates-released-f35&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]
    Błąd: Pobranie metadanych repozytorium „updates” się nie powiodło: Cannot prepare internal mirrorlist: Curl error (6): Couldn’t resolve host name for mirrors fedoraproject org/metalink?repo=updates-released-f35&arch=x86_64 [Could not resolve host: mirrors.fedoraproject.org]

@ozeszty jeśli chcesz napisac mój email r45u699by@fa99j1ne.to tylko wykasuj cyfry

These are the packages just for audacity on a F35 X86_64 machine that has never been updated. It was running in gnome boxes.

audacity-3.0.2-5.fc35.x86_64.rpm
libid3tag-0.15.1b-35.fc35.x86_64.rpm
libmad-0.15.1b-32.fc35.x86_64.rpm
libmspack-0.10.1-0.6.alpha.fc35.x86_64.rpm
portaudio-19-37.fc35.x86_64.rpm
suil-0.10.8-3.fc35.x86_64.rpm
vamp-plugin-sdk-2.9.0-4.fc35.x86_64.rpm

They can be downloaded with the below:
sudo dnf download --arch x86_64 --resolve audacity --release=35

sudo dnf download --arch x86_64 --resolve vamp-plugin-sdk --release=35

Edit:
I understand this doesn’t fully answer the question, but I wanted to at least clear up some of it.

I am trying to write a scenario on how to use a computer in a situation like in Ukraine. Electricity is sometimes there, internet is sometimes there, but not always. There is also not always access to repositories. No one will ever guarantee that all resources will always be available if this war lasts more than 10 years.

Just my opinion, this would likely be simpler with something that is intended to be run mostly offline (endless OS) or updated at slower pace.

If you’re looking for the dependencies for minimodem:

fftw-3.3.8-11.fc35.x86_64.rpm
fftw-libs-double-3.3.8-11.fc35.x86_64.rpm
fftw-libs-long-3.3.8-11.fc35.x86_64.rpm
fftw-libs-quad-3.3.8-11.fc35.x86_64.rpm
fftw-libs-single-3.3.8-11.fc35.x86_64.rpm
minimodem-0.24-12.fc35.x86_64.rpm

That’s not how --whatprovides works: https://dnf.readthedocs.io/en/latest/command_ref.html#repoquery-command - it’ll output name of package that contains library or file you’re looking for (you basically asked dnf “which RPM provides this RPM file”).
Besides, if you’re running dnf off-line and its cache is old, dnf wants to refresh it and you have to block it by appending -C, like @mattdm wrote.

That’s not how you get help or communicate issues, I already wrote about it before.

Start a new thread with just that, it’s a completely different issue. I guess some local repository mirror rsync’ed while internet is available will be a better solution for that (if it’s not a metered connection). It can be shared in local network, updated somewhere else and transported physically (disk sent by post or through someone), copied by someone else, etc.

3 Likes

@ozeszty can You explain what using -C ?
before i see “- C” not “-C”
@grumpey yes i download similar way
question is not how download but how install on machine without internet. all errors is in this situations. dnf not working correctly or I canot using them

Please read the community code of conduct. The assumption that people here are lying and misleading you is you being very very very unfair to everyone here that has taken the time to bother answering your question—which they really dont have to do. They owe you absolutely nothing and are being nice enough to try and help you when you’ve run into a problem.

So, yes, please be grateful that people are taking time to answer your question. Before writing a response, ask yourself if you are being excellent to others. If you are not, tou shouldnt post. We’re a community that assumes best intentions, not malice by default.

3 Likes

@ankursinha

you is you being very very very unfair

2+2 =5 is true? meybe You must change ‘unfar’ definition.
Please wrote where i wrote not truth.

I also have a request to everyone who wrote off something that doesn’t work. Please do not trash this thread.

Ok. my english is not good and meybe translator is not goot too but we talking about real problem and real truth or error.

Put all the downloaded files for a package into a directory:
So for audacity:

audacity-3.0.2-5.fc35.x86_64.rpm
libid3tag-0.15.1b-35.fc35.x86_64.rpm
libmad-0.15.1b-32.fc35.x86_64.rpm
libmspack-0.10.1-0.6.alpha.fc35.x86_64.rpm
portaudio-19-37.fc35.x86_64.rpm
suil-0.10.8-3.fc35.x86_64.rpm
vamp-plugin-sdk-2.9.0-4.fc35.x86_64.rpm

copy that directory by what ever means you prefer to your offline machine.
cd to that directory and:
sudo dnf install *.rpm

If should look something like: (where the repository indicates command line)

Because the machine isn’t in a consistent state you may need to work through additional issues.
Please keep in mind the process above is focused on the bare minimum to install package x not upgrading the entire machine.

2 Likes

@grumpey Trouble is with disk. Imagine.
Imagine this situation, you brought a usb drive and you have some updates on it. If you made a mistake it would be good for the system to tell you what is missing. It is not always the case that you have an unlimited disk and you want to install everything always.
Maybe someone made copies of the updates for 5 different people? It would be good to be able to upgrade only what you have in the system and not everything.

The person upgrading and downloading does not have to be the same person and the set of packages does not have to be the same. And even the system version doesn’t have to be the same, as it is in real life.

ideal situation is full disk updates and You only update small set
dnf update/install audacity/git/minimodem

Imagine this situation, you brought a usb drive and you have some updates on it. If you make a mistake See dnf knows it has to install the update from the drive, but the dependencies are already stubbornly downloading from the network and there is no way to persuade it to take them from the same usb drive

That’s easy. You didnt write the truth when you claimed that people are lying or misleading you because you cannot possibly know their motivation. You are assuming, and you are assuming negative intentions.

Please do better. We expect all users on all community channels to follow the code of conduct which requires us all to assume best intentions and give each other the benefit of the doubt.

2 Likes