3

I have installed Fedora 22 (using rootfs) on an Android 5.0 device with ARMv7 processor using GNURoot app. This is working OK. All commands in the rootfs execute OK. However, I have a problem with dnf.

dnf clean all and dnf update commands work OK. If I run dnf search <package name>, it works OK. I get the correct search results. If I run dnf info <package name>, it works OK. However, when I run dnf install <package name>, I get an error as follows:

Last metadata expiration check performed 1:52:54 ago on Sat Dec 26 11:05:25 2015.
No package <package name> available.
Error: Unable to find a match.

I get this error for every package, even if that package is available in the dnf search result.

An example:

> less
bash: less: command not found

> dnf search less
Last metadata expiration check performed 1:44:08 ago on Sat Dec 26 11:05:25 2015.
================== N/S Matched: less ===================
less.armv7hl : A text file browser similar to more, but
             : better
bless-doc.armv7hl : Bless user manual
python-lesscpy.noarch : Lesscss compiler
python3-lesscpy.noarch : Lesscss compiler
..
..
..

> dnf info less
Last metadata expiration check performed 1:44:58 ago on Sat Dec 26 11:05:25 2015.
Available Packages
Name        : less
Arch        : armv7hl
Epoch       : 0
Version     : 481
Release     : 1.fc22
Size        : 143 k
Repo        : updates
Summary     : A text file browser similar to more, but
            : better
URL         : http://www.greenwoodsoftware.com/less/
License     : GPLv3+ or BSD
Description : The less utility is a text file browser
            : that resembles more, but has more
            : capabilities.  Less allows you to move
            : backwards in the file as well as forwards.
            :  Since less doesn't have to read the
            : entire input file before it starts, less
            : starts up more quickly than text editors
            : (for example, vi).
            :
            : You should install less because it is a
            : basic utility for viewing text files, and
            : you'll use it frequently.

> dnf install less
Last metadata expiration check performed 1:50:23 ago on Sat Dec 26 11:05:25 2015.
No package less available.
Error: Unable to find a match.

> dnf install less.armv7hl
Last metadata expiration check performed 1:52:54 ago on Sat Dec 26 11:05:25 2015.
No package less.armv7hl available.
Error: Unable to find a match.

> dnf install less.armv7hl -v                           
cachedir: /var/cache/dnf
Loaded plugins: migrate
DNF version: 1.1.4
repo: using cache for: fedora
not found deltainfo for: Fedora 22 - armhfp
not found updateinfo for: Fedora 22 - armhfp
repo: using cache for: updates
fedora: using metadata from Sat May 23 09:54:23 2015.
updates: using metadata from Tue Dec 22 00:53:59 2015.
Last metadata expiration check performed 3:51:50 ago on Sat Dec 26 11:05:25 2015.
No package less.armv7hl available.
Error: Unable to find a match.

> dnf search less.armv7hl
Last metadata expiration check performed 0:18:04 ago on Sat Dec 26 15:27:49 2015.
Error: No matches found.

How can I resolve this error?

Thank you in advance for your help.

3

Open this file in your arm chroot:

 /usr/lib/python3.5/site-packages/dnf/conf/substitutions.py

And change __init__ function as below (effectively, hard code working arch names):

def __init__(self):
    super(Substitutions, self).__init__()
    arch = hawkey.detect_arch()
    self['arch'] = arch
    self['arch'] = 'armv7hl'
    self['basearch'] = dnf.rpm.basearch(arch)
    self['basearch'] = 'armhfp'
    self._update_from_env()

(The only change is to add these two lines:

    self['arch'] = 'armv7hl'
    self['basearch'] = 'armhfp'

)

  • I ran into this in F27. I can't believe this still isn't fixed. – Michael Hampton Nov 17 '17 at 21:14
  • hmmm... actually I'm not sure if I've reported the issue. – hedayat Nov 23 '17 at 21:05

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.