Linux Yum 失败 - 没有启用的存储库。
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20120973/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Yum fails with - There are no enabled repos.
提问by Shachar Hamuzim Rajuan
I'm trying to install "libstdc++.i686" with
我正在尝试安装“libstdc++.i686”
yum install libstdc++.i686
but it failes beacuse of this error:
但由于此错误而失败:
qa@qa-teamcity01:/usr/local/nsis/nsis-2.46-src$ sudo yum install libstdc++.i686
[sudo] password for qa:
There are no enabled repos. **Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable
qa@qa-teamcity01:/usr/local/nsis/nsis-2.46-src$ sudo yum install libstdc++.i686
[sudo] qa 密码:
没有启用的存储库。**运行“yum repolist all”以查看您拥有的存储库。
您可以使用 yum-config-manager --enable 启用 repos
I've looked at my repos.d directory (/etc/yum/repos.d) and its empty, and opend yum.conf file and didn't see any repositories.
我查看了我的 repos.d 目录 (/etc/yum/repos.d) 及其空的,并打开了 yum.conf 文件,但没有看到任何存储库。
How do i get the repositery that i need?
我如何获得我需要的存储库?
采纳答案by Shachar Hamuzim Rajuan
ok, so my problem was that I tried to install the package with yumwhich is the primary tool for getting, installing, deleting, querying, and managing Red Hat Enterprise Linux RPM software packages from official Red Hat software repositories, as well as other third-party repositories.
好的,所以我的问题是我尝试使用yum安装软件包,yum是从官方 Red Hat 软件存储库以及其他第三方获取、安装、删除、查询和管理 Red Hat Enterprise Linux RPM 软件包的主要工具- 方存储库。
But I'm using ubuntu and The usual way to install packages on the command line in Ubuntu is with apt-get. so the right command was:
但是我使用的是 ubuntu,在 Ubuntu 的命令行上安装软件包的常用方法是使用 apt-get。所以正确的命令是:
sudo apt-get install libstdc++.i686