在 Linux Red Hat 服务器上安装 apt-get
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5357816/
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
install apt-get on linux Red Hat server
提问by Philip Mais
I'm setting up a Linux Red Hat web server. apt-get isn't installed, but yum is. However, yum cannot find the apt package.
我正在设置 Linux Red Hat Web 服务器。apt-get 未安装,但 yum 已安装。但是,yum 找不到 apt 包。
When I run apt-get, I get a message from the shell saying that the command apt-get couldn't be found. When I try yum install apt or yum install apt-get I get a message saying yum couldn't find the package and there was nothing to do
当我运行 apt-get 时,我从 shell 收到一条消息,说找不到命令 apt-get。当我尝试 yum install apt 或 yum install apt-get 时,我收到一条消息,说 yum 找不到该软件包并且无事可做
I suspect that it's probably a case of editing a sources list (as with apt) to add the source that apt is available from, but I a) don't know where this source list would be, and b) don't know what source would provide apt...
我怀疑这可能是编辑源列表(与 apt 一样)以添加 apt 可用的源的情况,但是我 a) 不知道此源列表在哪里,并且 b) 不知道是什么源将提供合适的...
If anyone could enlighten me, it would be greatly appreciated
如果有人能启发我,将不胜感激
回答by Michael
If you have a Red Hat server use yum. apt-getis only for Debian, Ubuntu and some other related linux.
如果您有 Red Hat 服务器,请使用yum。apt-get仅适用于 Debian、Ubuntu 和其他一些相关的 linux。
Why would you want to use apt-getanyway? (It seems like you know what yumis.)
你为什么要使用apt-get呢?(看来您知道yum是什么。)
回答by PPC-Coder
I think you're running into problems because RedHat uses RPM for managing packages. Debian based systems use DEBs, which are managed with tools like apt.
我认为您遇到了问题,因为 RedHat 使用 RPM 来管理包。基于 Debian 的系统使用 DEB,这些 DEB 由 apt 等工具管理。
回答by Yuri
回答by william
wget http://dag.wieers.com/packages/apt/apt-0.5.15lorg3.1-4.el4.rf.i386.rpm
rpm -ivh apt-0.5.15lorg3.1-4.el4.rf.i386.rpm
wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.el4.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.4-1.el4.rf.i386.rpm
wget http://dag.wieers.com/packages/apt/apt-0.5.15lorg3.1-4.el4.rf.i386.rpm
rpm -ivh apt-0.5.15lorg3.1-4.el4.rf.i386.rpm
wget http://dag.wieers.com/packages/rpmforge-release/rpmforge-release-0.3.4-1.el4.rf.i386.rpm
rpm -Uvh rpmforge-release-0.3.4-1.el4.rf.i386.rpm
maybe some URL is broken,please research it. Enjoy~~
也许某些 URL 已损坏,请研究一下。欣赏~~