0

I have a URL which I want to install a package from. Typing

su -c 'dnf install http://www.geogebra.org/download/rpm.php?arch=amd64&ver=6'

gives the error:

rpm.php?arch=amd64                                 7.7 MB/s |  82 MB     00:10                                                                                               
Can not load RPM file: /var/cache/dnf/commandline-37cfae1a80d6dc87/packages/rpm.php?arch=amd64.
Could not open: /var/cache/dnf/commandline-37cfae1a80d6dc87/packages/rpm.php?arch=amd64
  • rpm has native support to download packages from a URL so why can't dnf?
  • Was it the download that failed or the installation? This part 7.7 MB/s | 82 MB seems to suggest that the download may have worked, if so where on the system can I find it?

Update:

Attempts

  1. I tried escaping the & as suggested in the comments but I got exactly the same error again.
  2. I tried using rpm -ivh http://www.geogebra.org/download/rpm.php?arch=amd64&ver=6 instead but it downloaded the wrong version and produced these errors:

    Updating / installing...
       1:geogebra5-5.0.481.0-630280       ################################# [100%]
    /var/tmp/rpm-tmp.bpatYN: line 1: /usr/local/bin/update-mime-database: No such file or directory
    error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Resource temporarily unavailable)
    error: /tmp/geogebra.sig.Q8fRVt: key 1 import failed.
    

    Then I uninstalled with rpm -e geogebra5 which produced this error:

    /var/tmp/rpm-tmp.7NnAnQ: line 1: /usr/local/bin/update-mime-database: No such file or directory
    
  • how do I escape the &? – MyWrathAcademia Jul 22 '18 at 14:00
  • yes I did some searching already but thanks, I actually do use them with echo. I've not had a dnf install fail before, from the output do you know if this command downloaded the rpm package? I want to run the same command again by escaping & but I need to know I have have to delete/clean anything beforehand. – MyWrathAcademia Jul 22 '18 at 14:13
1

It looks like your rpm database is locked. A lockfile is present. This normally happens only while a package is actively being installed or removed. However, if a package installation is interrupted (e.g. by a power failure) then the lockfile might be left over, even though no installation is in progress. If that's the case, you can just remove the lockfile and try again.

You also should escape the ampersand, if you actually want version 6 of the software. Otherwise, the shell interprets everything after it as a separate command, and you end up with version 5 of the software.

  • Wouldn't deleting .rpm.lock cause problems and it would not change the problem with dnf – MyWrathAcademia Jul 22 '18 at 16:32
  • I thought I covered deleting the lockfile in the first paragraph. Apparently I wasn't clear enough. As for dnf, it installs RPMs, so ultimately it does update the rpmdb. – Michael Hampton Jul 22 '18 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.