Tar command not found

Hi, I’ve just installed the minimal ISO of AlmaLinux 9.3 and I found out that the tar command is not available?! Worst, I have no internet connection at the moment, so, how can i solve this?
Thanks.

On a system that has access to repositories I can gather information with:

dnf provides *bin/tar
dnf rq --groupmember tar

Which tell that command ‘tar’ is from package ‘tar’ and that package is in ‘baseos’ repo.
Furthermore, the package is in dnf groups: base, standard, workstation-product.

dnf group info minimal-environment
dnf group info standard

The ‘standard’ is optional group for environment group “Minimal Install” and tar is mandatory when ‘standard’ is installed.

Summary: If the installer in the “minimal image” had any options for packages, then it might have had “include Standard”. If it did, then the image would have package file tar-*.rpm too.

The package tar does depend on glibc, libacl, and libselinux. All these you probably have installed.


Mount the installer image. Seek the RPM-file. Install it:

dnf --disablerepo=* install path_to_tar.rpm

If the image does not have the file, then download the package on networked computer, save to USB, mount the USB to Alma machine, etc

1 Like

Possibly not an option to reinstall the system and select the tar to be installed.

To get the latest version of tar (the one in the iso repo could be outdated and have security issues) you van download the program directly from the repo or use a similar system to and install the tar program with the download only option.

This will store rpm package which can be copied, uploaded and installed on the system without internet.

Most security issues are with internet and totally blocked by lack of network. It is up to @Petux to assess that risk.

Latest version of tar could require newer versions of libraries than what the system has, which would create a cascade of packages to get and install. (Quite possible as the “latest” is for Alma 9.4 and the image has 9.3.) Besides, if only tar is “latest”, then the rest of system is still “old”.

The point is valid though; updates can and do fix issues – how to regularly deliver them to isolated system expands from “how to get one package to the system”; you copy entire repos (to USB, etc media) and tell the system’s dnf to use that media.

You are correct that there could be more than one rpm that needs to be updated. And most risks are with a user uploading an prepared tar file that causes trouble.

@jlehtone Out of interest do you have experience in using a custom repo with only the needed packages instead of the full repo? This to keep the remote transfers a small as possible? Inserting an USB key on an remote non internet machine is not always possible. And USB could be disabled for security.

I don’t do “custom cherry-picks” on mirrors (nor have isolated systems to manage). I do sync “whole mirrors” with ‘rsync’.
For example:

RSYNC="/usr/bin/rsync -aqH --no-g --no-o --delete --delay-updates --bwlimit=1024"
VERS=9.4
SOURCE=${MIRROR}/${VERS}
DEST=/path_to_mirrors/almalinux.org/${VERS}
for R in BaseOS AppStream CRB extras
do
  ${RSYNC} ${SOURCE}/${R}/x86_64/os/ ${DEST}/${R}/x86_64/os/
done

That keeps “remote transfer” (from official mirror to my copy) minimal, except on point updates. Current copy:

# du -d1 -h 9.4
9.5G	9.4/BaseOS
17G	9.4/AppStream
24G	9.4/CRB
557K	9.4/extras
49G	9.4

One probably does not need ‘CRB’ on isolated system, so ~25G.

True. The OP was able to use minimal image, so there must be some media that was allowed. If you cannot transfer data after initial install in any way and you still want updates, then I see no other option than to repeat the initial install when updates come.