Is there any way to install any package on Fedora 33 without Internet?

naruroTTa

New Member
Joined
Mar 31, 2021
Messages
5
Reaction score
4
Credits
43
Hello, I'm using Fedora 33 (Spin Xfce) but I have no Internet. I need to install make and dkms. I tried some commands but it still needs Internet.
Bash:
sudo dnf install make.rpm
sudo dnf localinstall make.rpm
 


Hello, I'm using Fedora 33 (Spin Xfce) but I have no Internet. I need to install make and dkms. I tried some commands but it still needs Internet.
Bash:
sudo dnf install make.rpm
sudo dnf localinstall make.rpm
To install anything online you should need internet, however once downloaded you can kill the internet & keep using, such as the workstation or what you like.
I am newbie though so idk for sure.
 
Hello, I'm using Fedora 33 (Spin Xfce) but I have no Internet. I need to install make and dkms. I tried some commands but it still needs Internet.
Bash:
sudo dnf install make.rpm
sudo dnf localinstall make.rpm
Yes. It should be possible to install packages without an internet connection.
First you would need to obtain the software package(s) and all dependencies though.
 
When you do have an internet connection you can make a sync of the Fedoro 33 repositories and then change your machine to look at that repository when you don't have an internet connection.
1. Pick one of these mirrors
2. Sync the mirror to your local machine.
3. Then change your local repository source files(/etc/yum.repos.d) to match the location where your synced the Fedora mirror to.
 
Yes. It should be possible to install packages without an internet connection.
First you would need to obtain the software package(s) and all dependencies though.
do you not need to be online to "obtain the software package(s) and all dependencies though."?
 
When you do have an internet connection you can make a sync of the Fedoro 33 repositories and then change your machine to look at that repository when you don't have an internet connection.
1. Pick one of these mirrors
2. Sync the mirror to your local machine.
3. Then change your local repository source files(/etc/yum.repos.d) to match the location where your synced the Fedora mirror to.
I'm getting an error. Did I do something wrong?
 
Try this instead, from a terminal.
1. Install the needed packages
Code:
sudo dnf install dnf-utils

2. Create your mirror directory
Code:
mkdir $HOME/Downloads/mirror

3. Sync all Fedora repositories(This can take a while and may take quite a bit of disk space)
Code:
reposync -p $HOME/Downloads/mirror --download-metadata --repo=fedora
reposync -p $HOME/Downloads/mirror --download-metadata --repo=updates
reposync -p $HOME/Downloads/mirror --download-metadata --repo=fedora-modular
reposync -p $HOME/Downloads/mirror --download-metadata --repo=updates-modular
reposync -p $HOME/Downloads/mirror --download-metadata --repo=fedora-cisco-openh264

4. Make a backup of your current sources.
Code:
cd /etc/yum.repos.d
sudo mkdir original
sudo cp * original

5. Edit the files source files to the appropriate mirror directory. Take for example the fedora repository. It currently looks like this.
Code:
[fedora]
name=Fedora $releasever - $basearch
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
Change it to this.
Code:
[fedora]
name=Fedora $releasever - $basearch
baseurl=file:///home/tux/Downloads/mirror/fedora
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch
skip_if_unavailable=False
Also do this for: updates fedora-modular update-modular fedora-cisco-openh264
Remember to change the base url path to match the location where you synced the repositories to. So replace the tux with your username.

6. When you have internet access again and need to update your local repositories you will have to comment out de line with your local repository and uncomment the original as it was before. Making the changes so taking fedora as an example it would look like this with the lines we changed before.
Code:
#baseurl=file:///home/tux/Downloads/mirror/fedora
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
Also do this for updates fedora-modular update-modular fedora-cisco-openh264.

7. Sync the repositories again to update your local repositories with the same commands as in step 3.

8. When you don't have access to an internet connection anymore change your source files back as they were before so than it's reverse. It would then look like this again, taking the fedora repository as an example.
Code:
baseurl=file:///home/tux/Downloads/mirror/fedora
#baseurl=http://download.example/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/
#metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
I tried all these steps myself so they should work, good luck! ;)
 
Last edited:

Members online


Latest posts

Top