安装没有root权限的libssl-dev和libncurses5-dev

时间:2013-10-17 15:07:13

标签: erlang ncurses libssl

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

解压缩tarball后,我运行如下配置:

./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的情况下获取这些内容的方式/位置。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

您可以在家中编译ssl库以与代码一起使用。下载SSL和ncurses库(或使用apt-get source),如下所示:

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

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

./configure --with-ssl=$HOME/opt