|
发表于 2024-8-17 16:06:20
|
显示全部楼层
本帖最后由 白小飞0815 于 2024-8-17 16:15 编辑
为什么我输入这个命令yum -y install gcc gcc-c++ kernel-devel 会不成功,弹出什么:
One of the configured repositories failed (lnknown)and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail, There are a few ways to work 'fix" this:
1.Contact the upstream for the repository and get them to fix the problem.
Reconf igure the baseurl/etc, for the repository, to point to a workingupstream, This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).
3.Run the command with the repository temporarily disabledyum --disablerepo=<repoid>
Disable the repository permanently, so yum won't use it by default. Yumwill then just igmore the repository util you permaently enable itaga in or use --enablerepo for temporary usage :
yum-config-manager --disable <repoid>
N1
subscription-manager repos--disable=<repoid>
Conf igure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo, when it runs most commandsso will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise :
yum-conf ig-manager --save--setopt=<repoid>.skip if unavailable=true |
|