2016-05-14 2 views
-1

J'ai des problèmes pour lancer pip install -r requirements.txt sur Ubuntu 16.04. Je reçois cette erreur:Comment appliquer le correctif OpenSSL au système Ubuntu?

build/temp.linux-x86_64-2.7/_openssl.c:697:6: error: conflicting types for ‘BIO_new_mem_buf’ 

Je vérifiais certains forums et certains types Gentoo affichés this link avec la solution, mais je ne sais pas comment le faire fonctionner sur mon ordinateur:

diff --git a/dev-python/cryptography/cryptography-1.2.2.ebuild b/dev-python/cryptography/cryptography-1.2.2.ebuild 
index ae9dbd1..af7e5a1 100644 
--- a/dev-python/cryptography/cryptography-1.2.2.ebuild 
+++ b/dev-python/cryptography/cryptography-1.2.2.ebuild 
@@ -43,6 +43,8 @@ DEPEND="${RDEPEND} 

DOCS=(AUTHORS.rst CONTRIBUTING.rst README.rst) 

+PATCHES=("${FILESDIR}/${PN}-1.2.2-openssl-1.0.2g-mem_buf.patch") 
+ 
python_test() { 
    py.test -v -v -x || die "Tests fail with ${EPYTHON}" 
} 
diff --git a/dev-python/cryptography/files/cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch b/dev-python/cryptography/files/cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch 
new file mode 100644 
index 0000000..64d270b 
--- /dev/null 
+++ b/dev-python/cryptography/files/cryptography-1.2.2-openssl-1.0.2g-mem_buf.patch 
@@ -0,0 +1,12 @@ 
+diff -ru cryptography-1.2.2/src/_cffi_src/openssl/bio.py cryptography-1.2.2-fixed/src/_cffi_src/openssl/bio.py 
+--- cryptography-1.2.2/src/_cffi_src/openssl/bio.py 2016-01-29 20:26:11.000000000 +0100 
++++ cryptography-1.2.2-fixed/src/_cffi_src/openssl/bio.py 2016-03-01 20:32:25.172776288 +0100 
[email protected]@ -99,7 +99,7 @@ 
+ BIO *BIO_next(BIO *); 
+ BIO *BIO_find_type(BIO *, int); 
+ BIO_METHOD *BIO_s_mem(void); 
+-BIO *BIO_new_mem_buf(void *, int); 
++BIO *BIO_new_mem_buf(const void *, int); 
+ BIO_METHOD *BIO_s_file(void); 
+ BIO *BIO_new_file(const char *, const char *); 
+ BIO *BIO_new_fp(FILE *, int); 

Comment dois-je appliquer manuellement le correctif OpenSSL à un système Ubuntu?

Merci.

+0

Il y a littéralement une seule ligne dans ce patch. Savez-vous comment utiliser un éditeur de texte? –

+0

oui mais je ne suis pas sûr de ce que je suis supposé faire avec cette ligne –

Répondre

0

Pour exécuter ce script dans le commentaire que je devais créer un fichier patch patch foo.c < patch.diff

Vous pouvez obtenir plus de détails here