歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 關於在Linux(RHEL5.4)下安裝VMware-tools

關於在Linux(RHEL5.4)下安裝VMware-tools

日期:2017/2/28 16:23:54   编辑:Linux教程

在Linux(RHEL5.4)下安裝VMware-tools時遇到了以下問題:

Before you can compile modules, you need to have the following installed...

make
gcc
kernel headers of the running kernel

Searching for GCC...
The path "" is not valid path to the gcc binary.
Would you like to change it? [yes]

怎麼路徑為“”呢,然後在虛擬機linux系統裡GCC,沒有安裝~裝個吧。於是就在WMware Workstation 7裡重新加載當時裝RHEL5.4時的ISO文件了!

打開Virtual Machines Settings面板(如果不在全屏狀態下,就右擊RHEL5.4上面的標簽,點擊最下面的Settings,在Hardware裡單擊CD/DVD,然後在右邊Use ISO image file旁邊單擊brows選擇你當時安裝RHEL5.4時的ISO文件;如果在全屏模式下,就在上面的工具欄裡,點擊VM->Removable->CD/DVD,下面同上述)。

然後再重新connect(加載)驅動DVD就可以了。

在安裝盤裡把gcc*.rpm,kernel-devel-*.rpm都安裝。方法是在把這些文件復制到隨便一個地方。

然後再打開一個終端,進入這個目錄,輸入以下命令

rpm -ivh gcc*.rpm --nodeps

rpm -ivh kernel*.rpm --nodeps

安裝後進入剛才的終端裡按回車,

What is the location of the gcc program on your machine? /usr/bin/gcc

The path "/usr/bin/gcc" appears to be a valid path to the gcc binary.
Would you like to change it? [no]

Searching for a valid kernel header path...
The path "" is not valid.
Would you like to change it? [yes]

What is the location of the directory of C header files that match your running
kernel? /lib/modules/2.6.18-164.el5xen/build/include

The path "/lib/modules/2.6.18-164.el5xen/build/include" appears to be a valid
path to the kernel headers of the running kernel.
Would you like to change it? [no]

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-root/modules/vmmemctl-only'
make -C /lib/modules/2.6.18-164.el5xen/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. \
MODULEBUILDDIR= modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.el5-xen-i686'
CC [M] /tmp/vmware-root/modules/vmmemctl-only/backdoorGcc32.o
搞定了~

Copyright © Linux教程網 All Rights Reserved