多项式 - "can't find package Expect"

Multixterm - "can't find package Expect"

我试图在我的桌面计算机上打开 multixterm,但我最终遇到错误:

usr:~> multixterm can't find package Expect while executing "package require Expect" (file "/usr/local/bin/multixterm" line 6")

如有任何帮助,我们将不胜感激。我已经在我的笔记本电脑和朋友的机器上尝试了 运行ning multixterm,没有任何问题。 Expect 和 multixterm 都存在于 /usr/local/bin/ 目录中。

更新:我还发现 kibitz 和 autoexpect 都不会 运行。我现在假设程序在何处寻找 Expect 存在问题。有谁知道我如何 verify/check 吗?

首先,运行 ldd /usr/local/bin/expect 找出 Expect 库 (libexpect) 的位置。例如:

% ldd /usr/bin/expect | grep libexpect
    libexpect.so.5.45 => /usr/lib/x86_64-linux-gnu/libexpect.so.5.45 (0x00007f230f348000)
%

然后,导出 TCLLIBPATH var with the libexpect directory. For example (seems like you're using ):

% setenv TCLLIBPATH /usr/lib/x86_64-linux-gnu

然后 运行 你的 multixterm 命令。

根据我在Ubuntu上的经验,通过apt获得的libexpect.so不能用于package require,因为该文件包含3个undefined-symbol。 (例如 Debian Bug report logs - #890228

所以我从源代码编译了libexpect.so。为此,我必须编译 3 个来源:Tcl, Tk, and Expect.

解压源后,按如下方式安装:

$ cd /path/to/install
$ mkdir tcl tk expect
$
$ /path/to/download/tcl8.*.*/unix/configure \
      --prefix=/path/to/install/tcl
$ make ; make install
$
$ /path/to/download/tk8.*.*/unix/configure \
      --with-tcl=/path/to/install/tcl \
      --prefix=/path/to/install/tk
$ make ; make install
$
$ /path/to/download/expect5.*.*/configure \
      --with-tclconfig=/path/to/install/tcl/lib \
      --with-tkconfig=/path/to/install/tk/lib \
      --prefix=/path/to/install/expect
$ make ; make install

给我 64 位架构的文件 /path/to/install/expect/libexpect5.*.*.so,没有 undefined-symbols。

这里有 2 个关于编译的有用链接:

最后,在TCLLIBPATH不行的情况下,unwarping approach using TclKits with sdx可以补救。在 Ubuntu 上,我为 RHEL5 使用了一个 x86_64。

Expect 已从 ubuntu 的默认安装中删除,

运行一次:

conda install -c eumetsat Expect

事情应该会恢复正常。