我在Android5.0设备上安装了Fedora 22 (使用rootfs),ARMv7处理器使用GNURoot应用程序。这还可以用。rootfs中的所有命令都执行OK。不过,我对dnf有个问题。
dnf clean all和dnf update命令工作正常。如果我运行dnf search <package name>,它可以正常工作。我得到了正确的搜索结果。如果我运行dnf info <package name>,它可以正常工作。但是,当我运行dnf install <package name>时,会得到如下错误:
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.我会得到每个包的错误,即使该包在dnf搜索结果中可用。
举个例子:
> 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.如何解决此错误?
提前谢谢你的帮助。
发布于 2016-07-20 12:41:42
在手臂chroot中打开此文件:
/usr/lib/python3.5/site-packages/dnf/conf/substitutions.py并更改__init__函数如下(有效地,硬代码工作拱名):
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()(唯一的修改是添加这两行:
self['arch'] = 'armv7hl'
self['basearch'] = 'armhfp')
https://unix.stackexchange.com/questions/251669
复制相似问题