libssh2构建的configure命令为

./configure --disable-shared --with-libgcrypt

这样使用的是gcrypt库, 需要先安装yum install libgcrypt-devel.

但是在构建的过程中,总是失败, 在7.6的aarch上与7.5的X86_64 centos上都不能构建成功.

构建提示为:

../libtool: line 7474: cd: yes/lib: No such file or directory
libtool:   error: cannot determine absolute directory name of 'yes/lib'

https://github.com/cisco/cjose/issues/45 找到下面的提示:

The --with-jansson --with-openssl flags need a value that specifies where the respective libraries are found:

> ./configure --help | grep with
>   --disable-option-checking  ignore unrecognized --enable/--with options
>   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
>   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
>   --with-pic[=PKGS]       try to use only PIC/non-PIC objects [default=use
>   --with-aix-soname=aix|svr4|both
>   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
>   --with-sysroot[=DIR]    Search for dependent libraries within DIR (or the
>   --with-openssl          Location where OpenSSL can be found
>   --with-jansson          Location where Jansson can be found
> ```
>
> I guess it should have said:
>
> ```bash
>   --with-openssl[=DIR]          Location where OpenSSL can be found
>   --with-jansson[=DIR]          Location where Jansson can be found
> ```

意思就是`--with-openssl`这样的参数是需要一个参数的, 而没有提供会出现错误, 那么给`--with-libgcrypt`一个参数, 

```bash
./configure --disable-shared --with-libgcrypt=/usr/lib/

然后再make即可编译通过. 这个/usr/lib的意思是libgcrypt的安装路径,让链接生成libssh2.a时去寻找libgcrypt.a