Posts Tagged ‘yum’

RedHat/OEL 8 self-repo “package is filtered out by modular filtering”

Saturday, November 12th, 2022

RedHat introduced using modules in DNF on RHEL version 8 (and above). This opens very interesting new options, however, sometimes – a quick-n-dirty repo is needed. An example – for offline systems, a repo of already installed packages (on exactly similar system) is created for later use.

This used to work well on RHEL version 7, however, with modules, the above mentioned error message might appear.

A quick and simple workaround is to set DNF to ignore module filtering for a specific repository.

In the repo file (in /etc/yum.repos.d/) add the following line:


This will “flatten” the custom repo and allow for regular, RHEL version 7 compatible package installation.

Using yum with SOCKS proxy

Sunday, June 30th, 2019

SSH is a wonderful tool. One of its best features is the ability to pierce a firewall and let you go through it. If you’re using the dynamic port (-D as argument in command line openSSH), you actually get a SOCKS5 proxy over which you can transport all your desired data.

This allows you the freedom of accessing the Internet from a restricted machine, on the condition it can connect via SSH to another unrestricted machine. So – how does it work?

To simplify things – you will need two sessions on your restricted machine. Use the first to connect via SSH to an unrestricted machine, with the argument, in our example, -D 10000

What it tells the SSH connection is to create a SOCKS5 proxy locally (on the restricted machine) over port 10000, and all the transport sent there – to transfer through the remote (unrestricted) server.

Using the other session, we can implement local variable like this:

export http_proxy=socks5://localhost:10000

export https_proxy=socks5://localhost:10000

It sets a variable which yum (among many other programs) can read and use. Afterwards, using the same session, running ‘yum update‘ or ‘yum install package‘ will result in yum running through the proxy connection. Of course – the SSH session to the unrestricted server must be active at all times, or else yum command will fail.

Quick solve package dependency with rpm –aid

Tuesday, January 22nd, 2008

This is relevant for Redhat EL 3 and 4, and any other compatible system not using “yum”. RHEL5 uses “yum”, and its RPM system does not include the “–aid” flag, which we require so much.

1. Place all the available RPMS (I assume these are the installation medias, combined) in a single directory – for example: /mnt

2. Install manually the “rpmdb” package

3. Edit /etc/rpm/macros.solve and change two lines:

%_solve_pkgsdir /mnt

%_solve_name_fmt /mnt/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

-Notice: I have used /mnt. Replace it your preferred directory

Following these steps, any encounter with RedHat’s infamous “dependency hell” can be solved by using the flag “–aid” for the RPM command

“Pinning” a package using “YUM”

Sunday, January 6th, 2008

YUM is a nice (and useful, when used correctly) tool to manage packages, using RPM as its engine. APT, the Debian alternative, has this ability, and so does YUM.

YUM does not pin a specific version of a package, but rather avoids upgrading it as soon as it was marked. It remains installed, but never will it be upgraded, even if other packages require a specific, newer, version of this package.

This “upgrade prevention” can be done using the directive “exclude=” inside /etc/yum.conf, where the values are the names of the packages (wildcards can be used!), space limited.

And a big “thank you” to Omer, who have pointed out my mistake. Too much NIS lately…

mime_decode-1 FAILED: Can’t locate object method “seek” via package “File::Temp ” at /usr/lib/perl5/vendor_perl/5.8.5/MIME/ line 816

Sunday, January 6th, 2008

This is the error message I have seen in my Linux+Postfix+Amavisd-new system. Not only that, but Amavis has kept a copy of each message in its tmp directory, which reduced my /var size to nothing quite rapidly.

amavis[21189]: (21189-01) (!)PRESERVING EVIDENCE in /var/amavis/tmp/amavis-200

Doesn’t sound too good.

Partial search in google has produced the following mailing list compressed archive, which pointed me onwards. It could either be a problem with Amavis, or with Perl.

After some further investigation, it appears that RpmForge has released a non-compatible version of perl-MIME-tools – from 5.420 to 5.425-1-test. It was quite disappointing, but I had to downgrade the perl package to its origin (the latest which worked), and to force yum never to upgrade that specific package.

This one will be on a different post (for the sake of order and search ability).