2016-02-29 30 views
-3

我一直在尝试将我的linux机器安装到开发环境中所需的基本软件。我有一台RHEL6的机器,但它没有连接到互联网。我能够连接到lan和ssh到其他机器。我尝试使用yum进行安装,但因以下错误失败。我试图在没有互联网的情况下在RHEL6中安装C编译器

[[email protected]******* pcre-8.38]#yum install gcc-c++ 
Loaded plugins: aliases, changelog, downloadonly, kabi, presto, product-id, refresh-packagekit, security, subscription- 
       : manager, tmprepo, verify, versionlock 
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. 
Loading support for Red Hat kernel ABI 
https://www.softwarecollections.org/repos/rhscl/devtoolset-3/epel-6-x86_64/repodata/repomd.xml: [Errno 12] Timeout on https://www.softwarecollections.org/repos/rhscl/devtoolset-3/epel-6-x86_64/repodata/repomd.xml: (28, 'connect() timed out!') 
Trying other mirror. 
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhscl-devtoolset-3-epel-6-x86_64. Please verify its path and try again. 

在此之前,我安装的ngnix Web服务器和试图做一个使但与失败:

... 
checking windows.h presence... no 
checking for windows.h... no 
configure: error: You need a C++ compiler for C++ support. 
make[1]: *** [/home/gunjaj/software/pcre-8.38/Makefile] Error 1 
make[1]: Leaving directory `/home/gunjaj/software/nginx-1.8.1' 
make: *** [build] Error 2 

任何帮助表示赞赏。

PS:这个问题是相似的另一个问题How to install C compiler for GCC without Internet connection? (RHEL6)

,但我绝对没有现在越来越互联网的方式。

+1

http://serverfault.com/questions/156458/how-to-add-an-iso-dvd-of-rhel-to-the-repository-list-under-gnome-for-installing – 7171u

+1

如果您有RHEL DVD/ISO你把它挂载到机器上,'yum install gcc-C++' – 7171u

+3

这是Super User或ServerFault的问题,而不是SO。因为一旦你拥有开发环境并且实际上正在编程,SO才会变得相关! –

回答

0

看起来您的RHEL机器配置为从RHEL官方存储库下载软件包,这些软件包只能通过Internet访问。

如果您没有Internet连接,则可以使用/etc/yum.repos.d中的配置文件重新配置yum,以便从局域网上的某个本地RHEL镜像下载软件包。

要么必须具有Internet连接,要么需要将服务器配置为指向RHEL官方存储库的本地镜像。显然,如果不能在任何地方找到“某些东西”,则不能安装某些东西。令人遗憾的是,软件包不能出现在空气中,以便安装它们。

唯一的其他选择是你;在另一台具有必要连接的机器上下载相关的RPM,手动将它们复制到本机,然后使用rpm命令手动安装它们,而不是使用yum;或者获取基于DVD的安装介质并从安装DVD安装rpms。

相关问题