如何建造青葱

如何建造青葱

我正在尝试建立。我运行 x64 Debian Sqeeze。它遇到了我无法理解的编译问题……

john@hayek:~/build/katmagic-Shallot-831de01$ make
cc  -O3 -I/usr/include -I/usr/local/include -L/usr/lib -L/usr/local/lib  -Wall -o src/math.o -c src/math.c
In file included from src/math.c:3:
src/math.h:23:24: error: openssl/bn.h: No such file or directory
src/math.h:24:25: error: openssl/rsa.h: No such file or directory
src/math.h:25:25: error: openssl/sha.h: No such file or directory
In file included from src/math.c:3:
src/math.h:28: error: expected ‘)’ before ‘*’ token
src/math.h:29: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/math.h:31: error: expected ‘)’ before ‘*’ token
src/math.c:14: error: expected ‘)’ before ‘*’ token
src/math.c:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
src/math.c:56: error: expected ‘)’ before ‘*’ token
make: *** [src/math.o] Error 1

答案1

src/math.h:23:24: error: openssl/bn.h: No such file or directory
src/math.h:24:25: error: openssl/rsa.h: No such file or directory
src/math.h:25:25: error: openssl/sha.h: No such file or directory

我猜你没有安装 OpenSSL,或者至少没有安装包含标头的开发包。如果这样做,标头不在/usr/include或中/usr/local/include,因为这是 Shallot 默认情况下查找的位置。您可以通过运行以下命令添加自己的包含路径:

$ make CFLAGS=-I/path/to/openssl

libssl-dev在 Debian 上,这些文件可以在您可以安装的软件包apt-get或您最喜欢的软件包管理中找到。

答案2

我在 CentOS 6on 上遇到了类似的问题,并通过安装解决了它openssl-devel。以 root 身份运行此命令:

yum install openssl-devel

相关内容