3

我正在尝试在运行 Ubuntu 13.04 的共享服务器空间上进行 Erlang R16B02 的前缀安装。由于这是共享空间,我没有 root 权限。系统已安装 OpenSSL 1.0.1c。

解压压缩包后,我像这样运行配置:

./configure --prefix=/home/myname/software --with-ssl=/usr/lib/ssl/

系统对 ncurses 进行了比较:

...
checking whether the child waiter thread should be enabled... yes on SMP build, but not on non-SMP build
checking for kstat_open in -lkstat... (cached) no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltermlib... no
configure: error: No curses library functions found
configure: error: /bin/bash '/home/myname/software/otp_src_R16B02/erts/configure' failed for erts

除了 ncurses(我可能没有它),我还需要 libssl-dev(我不能没有它)。我尝试在没有 ncurses 的情况下进行安装(使用 --without-termcap 标志),如下所示:

./configure --prefix=/home/myname/software --with-ssl=/usr/lib/ssl/ --without-termcap
make

在这种情况下,配置成功,但加密失败:

make[2]: Entering directory `/home/myname/software/otp_src_R16B02/lib/crypto'
=== Entering application crypto
make[3]: Entering directory `/home/myname/software/otp_src_R16B02/lib/crypto/src'
make[3]: Nothing to be done for `opt'.
make[3]: Leaving directory `/home/myname/software/otp_src_R16B02/lib/crypto/src'
make[3]: Entering directory `/home/myname/software/otp_src_R16B02/lib/crypto/c_src'
make -f x86_64-unknown-linux-gnu/Makefile TYPE=opt
make[4]: Entering directory `/home/myname/software/otp_src_R16B02/lib/crypto/c_src'
/usr/bin/install -c -d ../priv/obj/x86_64-unknown-linux-gnu
gcc -c -o ../priv/obj/x86_64-unknown-linux-gnu/crypto.o -Werror=return-type  -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement  -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -g -O2 -I/home/myname/software/otp_src_R16B02/erts/x86_64-unknown-linux-gnu   -fno-tree-copyrename  -D_GNU_SOURCE -fPIC -DHAVE_DYNAMIC_CRYPTO_LIB -I/usr/lib/ssl//include -I/home/myname/software/otp_src_R16B02/erts/emulator/beam -I/home/myname/software/otp_src_R16B02/erts/include -I/home/myname/software/otp_src_R16B02/erts/include/x86_64-unknown-linux-gnu -I/home/myname/software/otp_src_R16B02/erts/include/internal -I/home/myname/software/otp_src_R16B02/erts/include/internal/x86_64-unknown-linux-gnu -I/home/myname/software/otp_src_R16B02/erts/emulator/sys/unix crypto.c
crypto.c:36:33: fatal error: openssl/opensslconf.h: No such file or directory
compilation terminated.
make[4]: *** [../priv/obj/x86_64-unknown-linux-gnu/crypto.o] Error 1
make[4]: Leaving directory `/home/myname/software/otp_src_R16B02/lib/crypto/c_src'
make[3]: *** [opt] Error 2
make[3]: Leaving directory `/home/myname/software/otp_src_R16B02/lib/crypto/c_src'
make[2]: *** [opt] Error 2
make[2]: Leaving directory `/home/myname/software/otp_src_R16B02/lib/crypto'
make[1]: *** [opt] Error 2
make[1]: Leaving directory `/home/myname/software/otp_src_R16B02/lib'
make: *** [libs] Error 2

如果我有 root 权限,我可以用 apt-get 解决这个问题:

sudo apt-get libncurses5-dev
sudo apt-get libssl-dev

但如果没有 apt-get,我不知道如何/从哪里获得这些资源。有人可以帮忙吗?

4

1 回答 1

0

您可以在家中编译 ssl 库以与您的代码一起使用。下载 SSL 和 ncurses 库(或使用apt-get source)和类似的东西:

./configure --prefix=$HOME/opt/libssl
make && make install

如果您使用的是 Debian 或 Ubuntu,它会更容易,因为您可以这样做:

apt-get source libssl
cd libssl
./configure --prefix=$HOME/opt/libssl
make && make install

之后,您可以配置 R16B02 以获取此位置的库:

./configure --with-ssl=$HOME/opt/libssl
于 2014-03-19T00:20:02.343 回答