3

当我尝试为 python 脚本安装依赖项时,出现此错误:

build/temp.linux-x86_64-2.7/_openssl.c:697:6: error: conflicting types for ‘BIO_new_mem_buf’
 BIO *BIO_new_mem_buf(void *, int);
      ^
In file included from /usr/include/openssl/asn1.h:65:0,
                 from build/temp.linux-x86_64-2.7/_openssl.c:413:
/usr/include/openssl/bio.h:692:6: note: previous declaration of ‘BIO_new_mem_buf’ was here
 BIO *BIO_new_mem_buf(const void *buf, int len);
      ^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

我试试这个补丁在这里找到:

diff --git a/dev-python/cryptography/cryptography-1.2.2.ebuild b/dev-python/cryptography/cryptography-1.2.2.ebuild

但后来我得到这个错误diff: option not recognize «--git»

如何修复此错误?

4

1 回答 1

4

diff --git不是命令,而是(补丁)的标题:git diff -p

-p选项产生的内容与传统的 diff 格式略有不同:

它前面有一个“git diff”标题,如下所示:

diff --git a/file1 b/file2

由于 gentoo repo 中的 diffstat 处于统一模式,您可以将其复制到补丁文件中,然后使用command将其应用到您的代码库中。 (在此处查看更多示例)。patch

patch foo.c < patch.diff
于 2016-05-14T16:00:42.630 回答