我正在尝试构建青葱。我运行 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
Run Code Online (Sandbox Code Playgroud)
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
Run Code Online (Sandbox Code Playgroud)
我猜你没有安装 OpenSSL,或者至少没有安装包含头文件的开发包。如果你这样做,标题不在/usr/include
or 中/usr/local/include
,因为这是默认情况下 Shallot 的位置。您可以通过运行添加自己的包含路径:
$ make CFLAGS=-I/path/to/openssl
Run Code Online (Sandbox Code Playgroud)
在 Debian 上,这些文件可以在libssl-dev
您可以安装的软件包apt-get
或您喜欢的软件包管理中找到。