Ошибка invalid version flag or

Перейти к контенту

I can’t run yum update. When I try, I get this:

--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64 -
--> Package python3-pycparser.noarch 0:2.14-14.el8 will be installed -
--> Package readline.x86_64 0:6.2-11.el7 will be updated 
--> Processing Dependency: libreadline.so.6()(64bit) for package: alt-sqlite-3.26.0-1.1.el7.x86_64 
--> Processing Dependency: libreadline.so.6()(64bit) for package: cpanel-sqlite-3.32.3-1.cp1198.x86_64 
--> Processing Dependency: libreadline.so.6()(64bit) for package: python-libs-2.7.5-91.el7.cloudlinux.x86_64 
--> Processing Dependency: libreadline.so.6()(64bit) for package: alt-php-internal-cli-7.4.22-2.el7.x86_64 
--> Processing Dependency: libreadline.so.6()(64bit) for package: jetlftp-4.9.1.1-1.x86_64 -
--> Package redhat-rpm-config.noarch 0:129-1.el8.alma will be installed Error: Invalid version flag: if

CloudLinux release: 8.6

AdminBee's user avatar

AdminBee

20.7k17 gold badges46 silver badges68 bronze badges

asked Aug 28, 2022 at 18:21

Gvidas Mikalauskas's user avatar

9

I’m trying to install Apache Cassandra on Red Hat 7 via yum as described here https://cassandra.apache.org/_/download.html. The installation process was successful with version 4.0.3.

However, with the latest version 4.0.5 the following error message is returned during the installation process Error: Invalid version flag: or.
The or operator was added to the Apache Cassandra configuration with https://github.com/apache/cassandra/tree/cd0a40d09e5c029e3cac260ecf4cb3dc02deabc7.

From my understanding the or operator was introduced with the RPM version 4.13 but Red Hat 7 ships with 4.11.3.

Is there any other solution than upgrading to a new Red Hat version?

asked Aug 8, 2022 at 12:17

consmons's user avatar

This is still happening on Cassandra 4.1.0. I successfully installed it on Centos 7 after I changed the repo baseUrl to noboolean path (basically, you just need to append /noboolean string to the path and that’s it). Steps to fix the issue:

  1. Run the vi /etc/yum.repos.d/cassandra.repo command
  2. Set baseurl=https://redhat.cassandra.apache.org/41x/noboolean and save the file
  3. Run the sudo yum install cassandra (as stated in the official docs)

Works fine. Cassandra 4.1 is up and running in the cluster. Centos 8+ doesn’t need this change and official instructions work well as they are.

answered Dec 29, 2022 at 17:23

Ivan Sivak's user avatar

Ivan SivakIvan Sivak

6,9583 gold badges35 silver badges42 bronze badges

Skip to navigation
Skip to main content

Red Hat Customer Portal

Infrastructure and Management

  • Red Hat Enterprise Linux
  • Red Hat Virtualization
  • Red Hat Identity Management
  • Red Hat Directory Server
  • Red Hat Certificate System
  • Red Hat Satellite
  • Red Hat Subscription Management
  • Red Hat Update Infrastructure
  • Red Hat Insights
  • Red Hat Ansible Automation Platform

Cloud Computing

  • Red Hat OpenShift
  • Red Hat CloudForms
  • Red Hat OpenStack Platform
  • Red Hat OpenShift Container Platform
  • Red Hat OpenShift Data Science
  • Red Hat OpenShift Online
  • Red Hat OpenShift Dedicated
  • Red Hat Advanced Cluster Security for Kubernetes
  • Red Hat Advanced Cluster Management for Kubernetes
  • Red Hat Quay
  • OpenShift Dev Spaces
  • Red Hat OpenShift Service on AWS

Storage

  • Red Hat Gluster Storage
  • Red Hat Hyperconverged Infrastructure
  • Red Hat Ceph Storage
  • Red Hat OpenShift Data Foundation

Runtimes

  • Red Hat Runtimes
  • Red Hat JBoss Enterprise Application Platform
  • Red Hat Data Grid
  • Red Hat JBoss Web Server
  • Red Hat Single Sign On
  • Red Hat support for Spring Boot
  • Red Hat build of Node.js
  • Red Hat build of Thorntail
  • Red Hat build of Eclipse Vert.x
  • Red Hat build of OpenJDK
  • Red Hat build of Quarkus

Integration and Automation

  • Red Hat Process Automation
  • Red Hat Process Automation Manager
  • Red Hat Decision Manager

All Products

Issue

# yum update
ID-CD_epel_redhat-7                | 2.6 kB  00:00:00
ID-CD_epel_redhat-8                | 2.4 kB  00:00:00
rhel-7-server-rpms                 | 2.0 kB  00:00:00
(1/9): ID-CD_epel_redhat-7/group   | 392 kB  00:00:00
(2/9): ID-CD_epel_redhat-7/updateinfo                             | 892 kB  00:00:00
(3/9): ID-CD_epel_redhat-7/primary | 4.9 MB  00:00:00
(4/9): ID-CD_epel_redhat-8/group   | 121 kB  00:00:00
(5/9): ID-CD_epel_redhat-8/updateinfo                             | 455 kB  00:00:00
(6/9): ID-CD_epel_redhat-8/primary | 2.6 MB  00:00:00
(7/9): rhel-7-server-rpms/7Server/x86_64/group                    | 637 kB  00:00:00
(8/9): rhel-7-server-rpms/7Server/x86_64/updateinfo               | 4.1 MB  00:00:00
(9/9): rhel-7-server-rpms/7Server/x86_64/primary                  |  51 MB  00:00:00
ID-CD_epel_redhat-7                                 13592/13592
ID-CD_epel_redhat-8                                 7349/7349
rhel-7-server-rpms                                  31780/31780
.

Error: Invalid version flag: if

Environment

  • Red Hat Enterprise Linux 7.x.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

As Michael mentioned in early comment, your are trying to perform an upgrade with the wrong process.

Firstly we have to be clear about update and upgrade.

Update

Sometimes called a software patch, an update is an addition to the current version of the application, operating system, or software that you are running. A software update addresses any issues or bugs to provide a better experience of working with the technology. In RHEL, an update relates to a minor release, for example, updating from RHEL 8.1 to 8.2.

Upgrade

An upgrade is when you replace the application, operating system, or software that you are currently running with a newer version. Typically, you first back up your data according to instructions from Red Hat. When you upgrade RHEL, you have two options:

In-place upgrade: During an in-place upgrade, you replace the earlier version with the new version without removing the earlier version first. The installed applications and utilities, along with the configurations and preferences, are incorporated into the new version.

Clean install: A clean install removes all traces of the previously installed operating system, system data, configurations, and applications and installs the latest version of the operating system. A clean install is ideal if you do not need any of the previous data or applications on your systems or if you are developing a new project that does not rely on prior builds.

As you are trying to move from version 7 to version 8 you need an upgrade.

In this point I would like to share with you the next video from Red Hat channel in youtube, this video shows you the In-Place Upgrade using Leapp.

Let me know if this resolve your concerns,

Rocky Linux Forum

Loading

Hello,

I attempt to upgrade from 4.1.16-1 to 5.x. So, I followed the steps mentioned here:
https://docs.strangebee.com/thehive/setup/installation/upgrade-from-4.x/#install-thehive_1

However, when I run sudo yum install thehive

I get the the following output:

Resolving Dependencies
--> Running transaction check
---> Package thehive.noarch 0:5.0.9-1 will be installed
Error: Invalid version flag: or

I am on Oracle Linux 7.9

I would like to know how I can fix it.

Thank you in advance for your help and your support.

I’m trying to install Apache Cassandra on Red Hat 7 via yum as described here https://cassandra.apache.org/_/download.html. The installation process was successful with version 4.0.3.

However, with the latest version 4.0.5 the following error message is returned during the installation process Error: Invalid version flag: or.
The or operator was added to the Apache Cassandra configuration with https://github.com/apache/cassandra/tree/cd0a40d09e5c029e3cac260ecf4cb3dc02deabc7.

From my understanding the or operator was introduced with the RPM version 4.13 but Red Hat 7 ships with 4.11.3.

Is there any other solution than upgrading to a new Red Hat version?

asked Aug 8, 2022 at 12:17

consmons's user avatar

This is still happening on Cassandra 4.1.0. I successfully installed it on Centos 7 after I changed the repo baseUrl to noboolean path (basically, you just need to append /noboolean string to the path and that’s it). Steps to fix the issue:

  1. Run the vi /etc/yum.repos.d/cassandra.repo command
  2. Set baseurl=https://redhat.cassandra.apache.org/41x/noboolean and save the file
  3. Run the sudo yum install cassandra (as stated in the official docs)

Works fine. Cassandra 4.1 is up and running in the cluster. Centos 8+ doesn’t need this change and official instructions work well as they are.

answered Dec 29, 2022 at 17:23

Ivan Sivak's user avatar

Ivan SivakIvan Sivak

7,0883 gold badges34 silver badges42 bronze badges

Yellowdog Update Modified

It’s a simple thing to keep your system updated. A quick yum update every few days — just like brushing your teeth. Completely painless, quick, efficient.

Not today it wasnt.

—> Package screen.x86_64 0:4.1.0-0.26.20120314git3c2946.el7 will be updated
—> Package screen.x86_64 0:4.1.0-0.27.20120314git3c2946.el7_9 will be an update
—> Package skypeforlinux.x86_64 0:8.67.0.96-1 will be updated
—> Package skypeforlinux.x86_64 0:8.71.0.36-1 will be an update
Error: Invalid version flag: or

This was the error I received. Okay, so when yum update fails, there’s always the tried and true command sequence that fixes it:

sudo yum clean all
sudo yum update —skip-broken

This time it didn»t work. I still received the same error. Time to google for more info… 

I found a kool command sequence on John S. De Stefano’s blog that looked promising:

sudo yum check all                # tells you of any problems
sudo package-cleanup —problems   # lists all known package problems
sudo package-cleanup —dupes      # lists duplicate packages
sudo package-cleanup —cleandupes # actually cleans up duplicates
sudo yum check all                # run again to check for remaining problems
sudo yum-complete-transaction —cleanup-only

However, this command sequence failed to fix the issue too. Looks like I’m going to have to work out what’s broken and why. No easy way out with this problem.

Rich Dependencies

Scrolling through bugzilla, I found the following entry:

There was a mistake made in the rpmlib() dep for rich deps. You need
at least rpm 4.13 for the base rich deps, and rpm 4.13.1 for the rest.

yum and related packages are no longer actively developed.
They are being replaced with dnf, dnf-utils, etc.

I’m closing this bug because it’s most likely never going to be fixed.
If you still consider your bug report important, reopen it, please.

https://bugzilla.redhat.com/show_bug.cgi?id=1578942

This was actually a bug report for F28+. Since Fedora uses DNF primarily and YUM is deprecated, no one seemed particularly interested in fixing it in Fedora. RHEL/CentOS 8 both use DNF as well. Could this bug have percolated down into CentOS 7? Time to check rpm versions and make sure I have at least 4.13:

$ yum —showduplicate list rpm

Installed Packages
rpm.x86_64                          4.11.3-45.el7                          @base
Available Packages
rpm.x86_64                          4.11.3-45.el7                          base 

Well, that’s just peachy!

I’m running an old version of rpm that doesn’t support rich dependencies. It also appears that yum may not handle them well either — although the indications are the problem really lies with rpmlib().

I’ve never really spent a lot of time looking at the inner workings of package managers and their respective update managers. Now that ignorance is coming back to haunt me and it’s time for some old fashioned studying the matter.

From rpm.org there’s an excellent description of how the boolean operators work and how they help avoid dependency hell. This is what is being referenced in the error I received. The ‘or’ operator is unknown because my version of rpm is too old. Boolean operators enable what is termed «rich dependencies». Basically providing a logical sequence for resolving dependency issues across multiple versions. A good example is community-mysql and mariadb. Both packages do the same thing — provide a mysql style database. Without rich dependencies, if another package requires mysql, you have to choose which package is required. With rich dependencies you can state:

Package A: Requires: mysql
Package mariadb: Provides: mysql
Package community-mysql: Provides: mysql
Suggests: mariadb to Package A.

Which means that if community-mysql is already installed, that is used as the dependency, otherwise mariadb is installed.

This is really cool, but yum simply ignores it.

Put simply, the root cause of the problem is:

1. RPM supports «rich dependencies»
2. DNF supports resolving packages with «rich dependencies»
3. YUM does not support resolving packages with «rich dependencies»

The solution then is obvious: Since CentOS 7 supports DNF, it’s time to switch. Fiddling with yum and manually resolving the dependencies will only delay the inevitable.

YUM vs DNF 

source

«Dandified YUM» or DNF, is the replacement package update manager for RHEL/CentOS. It’s been part of Fedora for a long time now. I acknowledge it is clearly superior to YUM in most aspects, plus it doesn’t suffer from some of the issues that Debian apt does. The major goal is to eliminate (where possible) dependency hell. But it also has other advantages.

It was also designed to be as drop-in replaceable to yum as possible. It comes very close, but some commands have no equivalent (some of these are deliberate actions). So, for me, if your used to using yum, dnf just represents yet another sequence of commands that must be memorised just to continue doing your job.

I’m not going to bore you with lists here of features, commands, comparisons etc. The links I’ve provided do that well enough. Plus, if you want a deep dive into dnf, you can go here. Suffice it to say that I decided that installing and using dnf was the simplest and most effect potential solution to the immediate and potentially long term problems.

Install DNF on CentOS7

Pretty simple really, however there are a number of dependencies since it leverages by Py2 and Py3. A total of 11 dependent packages were installed, however YMMV.

$sudo yum install dnf

Resolving Dependencies
—> Running transaction check
—> Package dnf.noarch 0:4.0.9.2-2.el7_9 will be installed
—> Processing Dependency: python2-dnf = 4.0.9.2-2.el7_9 for package: dnf-4.0.9.2-2.el7_9.noarch
—> Running transaction check
—> Package python2-dnf.noarch 0:4.0.9.2-2.el7_9 will be installed
—> Processing Dependency: dnf-data = 4.0.9.2-2.el7_9 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
—> Processing Dependency: python2-libdnf >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
—> Processing Dependency: python2-libcomps >= 0.1.8 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
—> Processing Dependency: python2-hawkey >= 0.22.5 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
—> Processing Dependency: libmodulemd >= 1.4.0 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
—> Processing Dependency: python2-libdnf for package: python2-dnf-4.0.9.2-2.el7_9.noarch
—> Processing Dependency: python-enum34 for package: python2-dnf-4.0.9.2-2.el7_9.noarch
—> Running transaction check
—> Package dnf-data.noarch 0:4.0.9.2-2.el7_9 will be installed
—> Package libmodulemd.x86_64 0:1.6.3-1.el7 will be installed
—> Package python-enum34.noarch 0:1.0.4-1.el7 will be installed
—> Package python2-hawkey.x86_64 0:0.22.5-2.el7_9 will be installed
—> Processing Dependency: libdnf(x86-64) = 0.22.5-2.el7_9 for package: python2-hawkey-0.22.5-2.el7_9.x86_64
—> Processing Dependency: libsolvext.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
—> Processing Dependency: libsolv.so.0(SOLV_1.0)(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
—> Processing Dependency: libsolvext.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
—> Processing Dependency: libsolv.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
—> Processing Dependency: librepo.so.0()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
—> Processing Dependency: libdnf.so.2()(64bit) for package: python2-hawkey-0.22.5-2.el7_9.x86_64
—> Package python2-libcomps.x86_64 0:0.1.8-14.el7 will be installed
—> Processing Dependency: libcomps(x86-64) = 0.1.8-14.el7 for package: python2-libcomps-0.1.8-14.el7.x86_64
—> Processing Dependency: libcomps.so.0.1.6()(64bit) for package: python2-libcomps-0.1.8-14.el7.x86_64
—> Package python2-libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
—> Running transaction check
—> Package libcomps.x86_64 0:0.1.8-14.el7 will be installed
—> Package libdnf.x86_64 0:0.22.5-2.el7_9 will be installed
—> Package librepo.x86_64 0:1.8.1-8.el7_9 will be installed
—> Package libsolv.x86_64 0:0.6.34-4.el7 will be installed
—> Finished Dependency Resolution

Dependencies Resolved

Next I tried dnf update:

$ sudo dnf update
<snip>
Running transaction check
Error: transaction check vs depsolve:
(libatomic or libatomic1) is needed by skypeforlinux-8.71.0.36-1.x86_64
rpmlib(RichDependencies) <= 4.12.0-1 is needed by skypeforlinux-8.71.0.36-1.x86_64
To diagnose the problem, try running: ‘rpm -Va —nofiles —nodigest’.
You probably have corrupted RPMDB, running ‘rpm —rebuilddb’ might fix the issue.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing ‘dnf clean packages’.

DNF is smart enough to know why the update failed. The package ‘skypeforlinux’ uses rich dependencies. These dependencies require a version of rpmlib that is greater than the CentOS 7 repositories can provide. Therefore, the dependencies cannot be resolved. There’s a tip there to use rpm directly to reconcile the issues, but since I know that the version of rpm is also too low, that won’t work.

I decide that I can live without skypeforlinux, so I remove it and both dnf and yum are happy.

At this point in time, since both work, I can use either to keep my system updated. However, having installed dnf and now that I’m comfortable working with it (having learned the syntax and equivalent commands) I think I’ll use it from now on.

Понравилась статья? Поделить с друзьями:
  • Ошибка intelppm sys
  • Ошибка installation has failed при установке discord
  • Ошибка invalid variant type conversion
  • Ошибка intel widi
  • Ошибка install failed no matching abis