What is the actual repo name?
That can be seen by cat /etc/yum.repos.d/virtualbox.repo
If the name was not correct when you tried to enable it then it would not be enabled.
If not enabled properly then it would not install.
If the repo file is not properly formatted it may not enable or install.
Step 2 has never been needed for me with any repo file I have ever installed. If properly formatted, the repo file being in that location automatically makes it available to the system.
The command dnf repolist will show you all the currently enabled repos. If the virtual box repo is not in that list then it was not enabled properly. That can be due to using the wrong name or because of an incorrectly formatted .repo file.
The command dnf repolist all will show all currently installed repos with either ‘enabled’ or ‘disabled’ at the far right for each.
Can you explain, what do you mean by “VIrtualBox has not been renamed for the rpm file”?
Also, if VirtualBox now is installed in this way, will I get updates for it from repository, or I will have to check manually if there’s a new update and install it by downloading file again?
Apparently VirtualBox does not set up their metadata for the repo to allow installing with just the package name as most fedora compatible repos do. This would explain why it would not be found with that dnf command. Probably the install would have worked if I had suggested sudo dnf install VirtualBox* --releasever=33. I did not expect them to have the metadata structured differently than most fedora repos.
Also the file name, even though they created a (linked) directory for fedora 35 and did an update in Jan 22, actually resides in a repo directory for fedora 33 and the actual file downloaded contains fedora33 as part of the name. Thus my “not renamed” comment.
Updates ? I don’t know but unless the repo structure & metadata is fixed it might become necessary to do manual updates instead of relying on the repo.
What does dnf list installed VirtualBox* tell you?
I think you don’t need add repository virtual box for install virtual box in Fedora 35 or Fedora 36(I run this on Fedora 35), Because there is already in repo official fedora. See my SS below you just type this:
sudo dnf install VirtualBox