2016-02-29 28 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。

相關問題