It is very strange. I saq there was a new kernel. I ran dnf update,
installed the new kernel (4.9.3).
Then I tried again the following command:
$ dnf install xorg-x11-drv-nvidia akmod-nvidia "kernel-devel-uname-r
and it worked without any error message.
Just one strange thing: after the first reboot, I got a black screen.
But the second reboot showed the session manager and I could check
that the nvidia proprietary driver is installed.