我正在尝试在 RedHat 5 上以普通用户身份安装 TCL/TK:
TCL_VERSION=8.6.1
BASE_PATH=/myownpath
tar -xzf tcl${TCL_VERSION}-src.tar.gz
cd tcl${TCL_VERSION}/unix
./configure \
--prefix=${BASE_PATH} \
--without-tzdata \
--enable-64bit
make -j9
sed -e "s@^\(TCL_SRC_DIR='\).*@\1${BASE_PATH}'@" \
-e "/TCL_B/s@='\(-L\)\?.*unix@='\1${BASE_PATH}/lib@" \
-i tclConfig.sh
make install
make install-private-headers
chmod -v 755 ${BASE_PATH}/lib/libtcl*.so
到目前为止一切顺利: ${BASE_PATH}/include/tcl.h 存在并且 ${BASE_PATH}/lib/tclConfig.sh 看起来不错:
# String to pass to the compiler so that an extension can
# find installed Tcl headers.
TCL_INCLUDE_SPEC='-I/myownpath/include'
然后我尝试安装TK:
tar -xzf tk${TCL_VERSION}-src.tar.gz
cd tk${TCL_VERSION}/unix
./configure \
--prefix=${BASE_PATH} \
--enable-64bit \
--with-tcl=${BASE_PATH}/lib \
make -j9
sed -e "s@^\(TK_SRC_DIR='\).*@\1${BASE_PATH}'@" \
-e "/TK_B/s@='\(-L\)\?.*unix@='\1${BASE_PATH}/lib@" \
-i tkConfig.sh
make install
make install-private-headers
chmod -v 755 ${BASE_PATH}/lib/libtk*.so
它在 make 失败并显示以下消息:
tk8.6.1/unix/../generic/tk.h:19:17: error: tcl.h: No such file or directory
我错过了什么?!?