2

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 
2
  • how do I escape the &? Commented Jul 22, 2018 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. Commented Jul 22, 2018 at 14:13

1 Answer 1

2

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.

2
  • Wouldn't deleting .rpm.lock cause problems and it would not change the problem with dnf Commented Jul 22, 2018 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. Commented Jul 22, 2018 at 16:39

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.