问题描述
我试图以RedHat 5上的普通用户身份安装TCL / TK:
I'm trying to install TCL/TK as a regular user on RedHat 5:
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看起来不错:
So far so good: ${BASE_PATH}/include/tcl.h exists and ${BASE_PATH}/lib/tclConfig.sh looks fine:
# 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
在创建时失败,并显示以下消息:
It fails at make with the following message:
tk8.6.1/unix/../generic/tk.h:19:17: error: tcl.h: No such file or directory
我错过了什么?!?
推荐答案
我按照以下步骤在Linux(Ubuntu)上安装了tcl,tk。
请使用sudo以避免任何与权限相关的问题
创建您选择的目录,说/ opt / tcltk
I followed below steps to install tcl, tk on Linux(Ubuntu).please use sudo to avoid any permission related issueCreate directory of your choice say /opt/tcltk
安装tcl
- 创建目录/ opt / tcltk
- 下载tcl8.6.9-src.tar.gz ,从()
- 在opt / tcltk /
- cd中的这两个tar文件上方移动/ opt / tcltk /安装tcl8.6.9
- / opt / tcltk> sudo gunzip -c tcl8.6.9-src.tar.gz | tar -xf-
- cd /opt/tcltk/tcl8.6.9/unix /
- /opt/tcltk/tcl8.6.9/unix> sudo ./configure --prefix = / opt / tcltk
- /opt/tcltk/tcl8.6.9/unix> sudo make
- 可选,您可以检查通过执行 sudo make test来进行
- /opt/tcltk/tcl8.6.9/unix> sudo make install
- 通过执行 / cli上的opt / tcltk / bin / tclsh8.6
- Create dir /opt/tcltk
- Download tcl8.6.9-src.tar.gz, tk8.6.9.1-src.tar.gz from (http://www.tcl.tk/software/tcltk/download.html)
- Move above these two tar files in opt/tcltk/
- cd /opt/tcltk/ to install tcl8.6.9
- /opt/tcltk> sudo gunzip -c tcl8.6.9-src.tar.gz | tar -xf -
- cd /opt/tcltk/tcl8.6.9/unix/
- /opt/tcltk/tcl8.6.9/unix> sudo ./configure --prefix=/opt/tcltk
- /opt/tcltk/tcl8.6.9/unix> sudo make
- Optional you can check make by executing "sudo make test"
- /opt/tcltk/tcl8.6.9/unix> sudo make install
- verify installation by executing "/opt/tcltk/bin/tclsh8.6" on cli
安装tk
-
cd / opt / tcltk /提取tk焦油
cd /opt/tcltk/ to Extract tk tar
/ opt / tcltk /> sudo gunzip -c tk8.6.9.1-src.tar.gz | tar -xf-
/opt/tcltk/>sudo gunzip -c tk8.6.9.1-src.tar.gz | tar -xf -
/opt/tcltk/tk8.6.9/unix> sudo ./configure --prefix = / opt / tcltk
/opt/tcltk/tk8.6.9/unix>sudo ./configure --prefix=/opt/tcltk
/opt/degrib/tcltk/tk8.6.9/unix> sudo make
/opt/degrib/tcltk/tk8.6.9/unix>sudo make
sudo make install
sudo make install
如果安装时出现任何问题,请随意发表评论
Please fell free to comments if there is any issue while installation
这篇关于没有root用户安装TCL / TK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!