chief
chief

Reputation: 11

Install specfic package version on centos using yum

How do I install specific version of a package via yum on centos 8?

I'm creating a dockerfile that needs:

I want to install them using yum; however, `yum install [packagename] did not do the trick for maven. I also need to install specific version of the aforementioned packages.

Errors I got:

Error: Nothing to do
The command '/bin/sh -c yum install maven-3.6.3' returned a non-zero code: 1

Error: Nothing to do
The command '/bin/sh -c yum install [email protected]' returned a non-zero code: 1

The command '/bin/sh -c yum install maven' returned a non-zero code: 1

Dockerfile:

FROM adoptopenjdk/openjdk11:centos-slim

RUN yum install maven-3.6.3

CMD [""]

Upvotes: 0

Views: 2706

Answers (1)

KetZoomer
KetZoomer

Reputation: 2914

You can do sudo yum install <package_name>-<version_info> to install a certain package version, and sudo yum downgrade <package_name>-<version_info> to downgrade to a certain version.

Edit: Try to use sudo if this does not work.

Upvotes: 1

Related Questions