gpt4 book ai didi

erlang - 无需 root 权限即可安装 libssl-dev 和 libncurses5-dev

转载 作者:行者123 更新时间:2023-12-02 04:35:03 24 4
gpt4 key购买 nike

我正在尝试在运行 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 的情况下如何/在哪里获取这些资源。有人可以帮忙吗?

最佳答案

您可以在您的家中编译 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

关于erlang - 无需 root 权限即可安装 libssl-dev 和 libncurses5-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19430437/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com