18

I am attempting to install dnf on my CENTOS 7 machine. Using this as my guideline I ran the first two commands of

sudo yum install epel-release

sudo yum install dnf

and that successfully works.

Installed:
dnf.noarch 0:0.6.4-2.el7

Now I am trying to install Spotify which according to this site I need to run

[joey ~]# dnf config-manager --add-repo=http://negativo17.org/repos/fedora-spotify.repo
No such command: config-manager. Please use /bin/dnf --help
It could be a DNF plugin command.

In the DNF site it looks like it goes to 2.0 so I am guessing I am using an outdated DNF but it looks like the latest for me is 0.6.4-2.el7. So I go to the DNF Github page to try to install it manually. I clone it and attempt to run the first command.

[joey dnf]$ sudo dnf builddep dnf.spec
No such command: builddep. Please use /bin/dnf --help
It could be a DNF plugin command.

I am not sure what else to do at this point. I am basically just trying to get Spotify installed on my CentOS machine and not sure how to proceed from here.

Attempts/Update

[joey ~]$ sudo dnf install dnf-plugin-config-manager
CentOS-7 - cr                                   7.3 MB/s | 5.0 MB     00:00    
Using metadata from Thu Dec  1 16:19:53 2016
No package dnf-plugin-config-manager available.
Error: no package matched: dnf-plugin-config-manager
Joey
  • 1,724
  • 3
  • 18
  • 38

2 Answers2

56

sudo yum install dnf-plugins-core did the trick for me.

UPDATE: on el7, el8, el9 there is a better way

  • when you try to execute dnf config-manager -h it will tell you to try dnf install 'dnf-command(config-manager)'
# centos7
# rocky8
# rocky9
sudo dnf install 'dnf-command(config-manager)'

p.s. the high level solution is actually "try to execute the dnf config-manager -h and if the command fails then read the error message and try installing what the error message recommends".

Trevor Boyd Smith
  • 18,164
  • 32
  • 127
  • 177
nathangiesbrecht
  • 845
  • 12
  • 26
0

Install the COPR plugin and EPEL

$ sudo yum install yum-plugin-copr epel-release

Enable this repo

$ sudo yum copr enable ngompa/snapcore-el7

Install snapd

$ sudo yum install snapd

Enable snapd.socket

$ sudo systemctl enable --now snapd.socket

Install GNOME Software snap plugin, note that GNOME Software gets replaced in this step

$ sudo yum install gnome-software-snap

How do I run spotify...

run 'spotify' in your terminal Or search for the App in your applications

For more tips you can take a look at my Github repo: https://github.com/Winterhart/CentOS7-Setup