本文介绍了diff:选项不识别«--git»的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我试图为python脚本安装depencies时,得到这个错误:
When I'm trying to install depencies for a python script I get this error:
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
我尝试这个补丁发现:
I try this patch found here:
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»
如何修复此错误?
推荐答案
diff --git
不是命令,而是(补丁)的标题:
diff --git
is not a command, but the header of a git diff -p
(patch):
它之前有一个git diff标头,如下所示:
It is preceded with a "git diff" header that looks like this:
diff --git a/file1 b/file2
由于gentoo中的diffstat在统一模式下,您可以将其复制到补丁文件中,然后,并使用。
(请参阅)。
Since the diffstat in the gentoo repo is in unified mode, you can copy it in a patch file, and apply it to your codebase with a patch
command.
(See more examples here).
patch foo.c < patch.diff
这篇关于diff:选项不识别«--git»的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!