Update yum package using localinstall
Answer is, it depends on how some-package
is packaged. In general, most of the .rpms
packaged with foo-version-release.rpm
gets obsoleted by the same package foo
with version++
and/or release++
.
Looking at your some-package
, if you would run yum localinstall some-package-2.0.0.rpm
(note, not with -y
), then you would see message from yum
, something like this:
Resolving Dependencies
--> Running transaction check
---> Package foo.x86_64 0:1.0.0 will be updated
---> Package foo.x86_64 0:2.0.0 will be an update
This tells that yum
is going to update the package and remove the old one. yum
resolves these dependencies whereas a rpm -ivh
won't do it.
Now, there are special cases, e.g., kernel
where it will be installed on the system side-by-side with the old one, unless you manual invoked a rpm -Uvh kernel*.rpm
command.
Equivalent command to the yum localinstall
would be two-fold,
# This will fail if some-2.0.0 is designed to obsolete some-1.0.0
$ rpm -ivh --test some-2.0.0.rpm
whereas following would succeed:
$ rpm -Uvh --test some-2.0.0.rpm
Note, I am using --test
to do a dry-run. One needs to remove it for a real installation.
How to install all rpm dependencies and map local to created YUM repository?
yum
doesn't remember what repo it was installed from. When you asked yum
for any info about any packages it knows about named http-parser
, it told you it knows of the one that is currently installed. It uses the reserved name "installed" for that purpose.
How to update CentOS packages with dependencies without access to a repository
Apparently the error happens because not all the dependencies are listed in the command. All 4 pacemaker
components have to be updated at once and the command that does this is:
sudo yum install http://mirror.centos.org/centos/6/os/x86_64/Packages/pacemaker-libs-1.1.18-3.el6.x86_64.rpm http://mirror.centos.org/centos/6/os/x86_64/Packages/pacemaker-cli-1.1.18-3.el6.x86_64.rpm http://mirror.centos.org/centos/6/os/x86_64/Packages/pacemaker-1.1.18-3.el6.x86_64.rpm http://mirror.centos.org/centos/6/os/x86_64/Packages/pacemaker-cluster-libs-1.1.18-3.el6.x86_64.rpm
Avoid yum error when a package is already installed
Use the packages directive:
packages:
rpm:
webcore-fonts: http://somesite.com/rpm/webcore-fonts-3.0-1.noarch.rpm
This will handle not installed and already installed scenarios.
How to install software on a prorietary linux distro with no repos given?
There are few possible ways:
activate your RHEL machine.. This include create account in RH. And
its free for small number of machines. More info here.Download the package and do a local install:
dnf localinstall package.rpm
You should download and install all dependent packages also.
To update you can use nondocumented option:
dnf localupdate package.rpm
Related Topics
How to Run a Cron Job with Arguments and Pass Results to a Log
Why Glibc Binary Is Called Libc.So.6 Not a Libc.So.1 or Libc.So.4
Automatically Adjusting Process Priorities Under Linux
Open-Source Opengl Profiler for Linux
Get .Net Core Dll Version on Linux
How to Ping Other Containers in a Docker Network Through Their Hostname
How to Use "Xargs" Properly When Argument List Is Too Long
Compilation Gcc 4.6.2 (Cannot Compute Suffix of Object Files)
Install Lisp on My Linux Machine
Bash Script: Can Not Properly Handle Sigtstp
Read Lines Between Two Keywords
Systemd/Udev Dependency Failure When Auto Mounting Separate Partition During Startup
Linux: Move 1 Million Files into Prefix-Based Created Folders