До сих пор я не смог установить это расширение на моей машине с OS X. У меня не было проблем с CentOS или RedHat.
Я собрал gpgme-1.3.0 из исходного кода.
sudo /Applications/XAMPP/xamppfiles/bin/pecl install gnupg
Relvant output:
`sudo /Applications/XAMPP/xamppfiles/bin/pecl install gnupg
[...]
cc -I. -I/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg -DPHP_ATOM_INC -I/private/var/tmp/pear-build-root/gnupg-1.3.2/include -I/private/var/tmp/pear-build-root/gnupg-1.3.2/main -I/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1 -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/main -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/TSRM -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/Zend -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/ext -I/Applications/XAMPP/xamppfiles/include/php/php-5.3.1/php/ext/date/lib -I/Applications/XAMPP/xamppfiles/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c -fno-common -DPIC -o .libs/gnupg.o
In file included from /Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/php_gnupg.h:33,
from /Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:22:
/usr/local/include/gpgme.h:44:23: error: gpg-error.h: No such file or directory
In file included from /Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/php_gnupg.h:33,
from /Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:22:
/usr/local/include/gpgme.h:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_error_t'
/usr/local/include/gpgme.h:114: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_err_code_t'
/usr/local/include/gpgme.h:115: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_err_source_t'
/usr/local/include/gpgme.h:119: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_err_make'
/usr/local/include/gpgme.h:132: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_error'
/usr/local/include/gpgme.h:139: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_err_code'
/usr/local/include/gpgme.h:146: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_err_source'
/usr/local/include/gpgme.h:154: error: expected ')' before 'err'
/usr/local/include/gpgme.h:163: error: expected ')' before 'err'
/usr/local/include/gpgme.h:168: error: expected ')' before 'err'
/usr/local/include/gpgme.h:174: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_err_code_from_errno'
/usr/local/include/gpgme.h:179: error: expected ')' before 'code'
/usr/local/include/gpgme.h:184: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_err_make_from_errno'
/usr/local/include/gpgme.h:188: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gpgme_error_from_errno'
/usr/local/include/gpgme.h:628: error: expected specifier-qualifier-list before 'gpgme_error_t'
/usr/local/include/gpgme.h:779: error: expected declaration specifiers or '...' before '*' token
/usr/local/include/gpgme.h:782: error: 'gpgme_error_t' declared as function returning a function
/usr/local/include/gpgme.h:791: error: 'gpgme_edit_cb_t' declared as function returning a function
/usr/local/include/gpgme.h:799: error: 'gpgme_new' declared as function returning a function
/usr/local/include/gpgme.h:805: error: 'gpgme_set_protocol' declared as function returning a function
/usr/local/include/gpgme.h:816: error: 'gpgme_set_sub_protocol' declared as function returning a function
/usr/local/include/gpgme.h:847: error: 'gpgme_set_keylist_mode' declared as function returning a function
/usr/local/include/gpgme.h:855: error: expected declaration specifiers or '...' before 'gpgme_passphrase_cb_t'
/usr/local/include/gpgme.h:859: error: expected declaration specifiers or '...' before 'gpgme_passphrase_cb_t'
/usr/local/include/gpgme.h:875: error: 'gpgme_set_locale' declared as function returning a function
/usr/local/include/gpgme.h:887: error: 'gpgme_ctx_set_engine_info' declared as function returning a function
/usr/local/include/gpgme.h:903: error: 'gpgme_signers_add' declared as function returning a function
/usr/local/include/gpgme.h:932: error: 'gpgme_get_sig_key' declared as function returning a function
/usr/local/include/gpgme.h:945: error: 'gpgme_sig_notation_add' declared as function returning a function
/usr/local/include/gpgme.h:954: error: 'gpgme_io_cb_t' declared as function returning a function
/usr/local/include/gpgme.h:963: error: 'gpgme_register_io_cb_t' declared as function returning a function
/usr/local/include/gpgme.h:983: error: field 'err' declared as a function
/usr/local/include/gpgme.h:986: error: field 'op_err' declared as a function
/usr/local/include/gpgme.h:1071: error: 'gpgme_data_new' declared as function returning a function
/usr/local/include/gpgme.h:1081: error: 'gpgme_data_new_from_mem' declared as function returning a function
/usr/local/include/gpgme.h:1093: error: 'gpgme_data_new_from_cbs' declared as function returning a function
/usr/local/include/gpgme.h:1095: error: 'gpgme_data_new_from_fd' declared as function returning a function
/usr/local/include/gpgme.h:1097: error: 'gpgme_data_new_from_stream' declared as function returning a function
/usr/local/include/gpgme.h:1104: error: 'gpgme_data_set_encoding' declared as function returning a function
/usr/local/include/gpgme.h:1113: error: 'gpgme_data_set_file_name' declared as function returning a function
/usr/local/include/gpgme.h:1123: error: 'gpgme_data_new_with_read_cb' declared as function returning a function
/usr/local/include/gpgme.h:1130: error: 'gpgme_data_new_from_file' declared as function returning a function
/usr/local/include/gpgme.h:1137: error: 'gpgme_data_new_from_filepart' declared as function returning a function
/usr/local/include/gpgme.h:1141: error: 'gpgme_data_rewind' declared as function returning a function
/usr/local/include/gpgme.h:1149: error: 'gpgme_get_key' declared as function returning a function
/usr/local/include/gpgme.h:1197: error: 'gpgme_cancel' declared as function returning a function
/usr/local/include/gpgme.h:1200: error: 'gpgme_cancel_async' declared as function returning a function
/usr/local/include/gpgme.h:1207: error: field 'reason' declared as a function
/usr/local/include/gpgme.h:1237: error: 'gpgme_op_encrypt_start' declared as function returning a function
/usr/local/include/gpgme.h:1240: error: 'gpgme_op_encrypt' declared as function returning a function
/usr/local/include/gpgme.h:1249: error: 'gpgme_op_encrypt_sign_start' declared as function returning a function
/usr/local/include/gpgme.h:1252: error: 'gpgme_op_encrypt_sign' declared as function returning a function
/usr/local/include/gpgme.h:1271: error: field 'status' declared as a function
/usr/local/include/gpgme.h:1299: error: 'gpgme_op_decrypt_start' declared as function returning a function
/usr/local/include/gpgme.h:1301: error: 'gpgme_op_decrypt' declared as function returning a function
/usr/local/include/gpgme.h:1307: error: 'gpgme_op_decrypt_verify_start' declared as function returning a function
/usr/local/include/gpgme.h:1309: error: 'gpgme_op_decrypt_verify' declared as function returning a function
/usr/local/include/gpgme.h:1362: error: 'gpgme_op_sign_start' declared as function returning a function
/usr/local/include/gpgme.h:1365: error: 'gpgme_op_sign' declared as function returning a function
/usr/local/include/gpgme.h:1398: error: field 'status' declared as a function
/usr/local/include/gpgme.h:1422: error: field 'validity_reason' declared as a function
/usr/local/include/gpgme.h:1451: error: 'gpgme_op_verify_start' declared as function returning a function
/usr/local/include/gpgme.h:1454: error: 'gpgme_op_verify' declared as function returning a function
/usr/local/include/gpgme.h:1484: error: field 'result' declared as a function
/usr/local/include/gpgme.h:1547: error: 'gpgme_op_import_start' declared as function returning a function
/usr/local/include/gpgme.h:1548: error: 'gpgme_op_import' declared as function returning a function
/usr/local/include/gpgme.h:1550: error: 'gpgme_op_import_ext' declared as function returning a function
/usr/local/include/gpgme.h:1553: error: 'gpgme_op_import_keys_start' declared as function returning a function
/usr/local/include/gpgme.h:1554: error: 'gpgme_op_import_keys' declared as function returning a function
/usr/local/include/gpgme.h:1561: error: 'gpgme_op_export_start' declared as function returning a function
/usr/local/include/gpgme.h:1564: error: 'gpgme_op_export' declared as function returning a function
/usr/local/include/gpgme.h:1569: error: 'gpgme_op_export_ext_start' declared as function returning a function
/usr/local/include/gpgme.h:1572: error: 'gpgme_op_export_ext' declared as function returning a function
/usr/local/include/gpgme.h:1578: error: 'gpgme_op_export_keys_start' declared as function returning a function
/usr/local/include/gpgme.h:1582: error: 'gpgme_op_export_keys' declared as function returning a function
/usr/local/include/gpgme.h:1607: error: 'gpgme_op_genkey_start' declared as function returning a function
/usr/local/include/gpgme.h:1609: error: 'gpgme_op_genkey' declared as function returning a function
/usr/local/include/gpgme.h:1618: error: 'gpgme_op_delete_start' declared as function returning a function
/usr/local/include/gpgme.h:1620: error: 'gpgme_op_delete' declared as function returning a function
/usr/local/include/gpgme.h:1627: error: 'gpgme_op_edit_start' declared as function returning a function
/usr/local/include/gpgme.h:1630: error: 'gpgme_op_edit' declared as function returning a function
/usr/local/include/gpgme.h:1636: error: 'gpgme_op_card_edit_start' declared as function returning a function
/usr/local/include/gpgme.h:1639: error: 'gpgme_op_card_edit' declared as function returning a function
/usr/local/include/gpgme.h:1659: error: 'gpgme_op_keylist_start' declared as function returning a function
/usr/local/include/gpgme.h:1662: error: 'gpgme_op_keylist_ext_start' declared as function returning a function
/usr/local/include/gpgme.h:1665: error: 'gpgme_op_keylist_next' declared as function returning a function
/usr/local/include/gpgme.h:1668: error: 'gpgme_op_keylist_end' declared as function returning a function
/usr/local/include/gpgme.h:1673: error: 'gpgme_op_passwd_start' declared as function returning a function
/usr/local/include/gpgme.h:1675: error: 'gpgme_op_passwd' declared as function returning a function
/usr/local/include/gpgme.h:1718: error: 'gpgme_op_trustlist_start' declared as function returning a function
/usr/local/include/gpgme.h:1722: error: 'gpgme_op_trustlist_next' declared as function returning a function
/usr/local/include/gpgme.h:1725: error: 'gpgme_op_trustlist_end' declared as function returning a function
/usr/local/include/gpgme.h:1759: error: 'gpgme_op_getauditlog_start' declared as function returning a function
/usr/local/include/gpgme.h:1761: error: 'gpgme_op_getauditlog' declared as function returning a function
/usr/local/include/gpgme.h:1767: error: 'gpgme_assuan_data_cb_t' declared as function returning a function
/usr/local/include/gpgme.h:1771: error: 'gpgme_assuan_inquire_cb_t' declared as function returning a function
/usr/local/include/gpgme.h:1774: error: 'gpgme_assuan_status_cb_t' declared as function returning a function
/usr/local/include/gpgme.h:1785: error: 'gpgme_op_assuan_transact_start' declared as function returning a function
/usr/local/include/gpgme.h:1797: error: 'gpgme_op_assuan_transact_ext' declared as function returning a function
/usr/local/include/gpgme.h:1804: error: field 'err' declared as a function
/usr/local/include/gpgme.h:1821: error: 'gpgme_op_assuan_transact' declared as function returning a function
/usr/local/include/gpgme.h:1838: error: 'gpgme_op_vfs_mount' declared as function returning a function
/usr/local/include/gpgme.h:1842: error: 'gpgme_op_vfs_create' declared as function returning a function
/usr/local/include/gpgme.h:1987: error: 'gpgme_conf_arg_new' declared as function returning a function
/usr/local/include/gpgme.h:1997: error: 'gpgme_conf_opt_change' declared as function returning a function
/usr/local/include/gpgme.h:2003: error: 'gpgme_op_conf_load' declared as function returning a function
/usr/local/include/gpgme.h:2007: error: 'gpgme_op_conf_save' declared as function returning a function
/usr/local/include/gpgme.h:2013: error: 'gpgme_key_from_uid' declared as function returning a function
/usr/local/include/gpgme.h:2038: error: 'gpgme_get_engine_info' declared as function returning a function
/usr/local/include/gpgme.h:2044: error: 'gpgme_set_engine_info' declared as function returning a function
/usr/local/include/gpgme.h:2051: error: 'gpgme_engine_check_version' declared as function returning a function
/usr/local/include/gpgme.h:2075: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'GpgmePassphraseCb'
In file included from /Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:22:
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/php_gnupg.h:38: error: field 'err' declared as a function
In file included from /Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:25:
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/php_gnupg_keylistiterator.h:38: error: field 'err' declared as a function
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'gnupg_res_init':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:137: error: expected expression before 'struct'
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zm_info_gnupg':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:373: error: expected expression before 'struct'
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: At top level:
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:381: error: 'passphrase_cb' declared as function returning a function
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:409: error: 'passphrase_decrypt_cb' declared as function returning a function
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'gnupg_fetchsignatures':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:447: warning: passing argument 4 of 'add_assoc_long_ex' makes integer from pointer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_keyinfo':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:623: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:623: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:623: error: (Each undeclared identifier is reported only once
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:623: error: for each function it appears in.)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:630: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_addsignkey':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:722: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:722: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:735: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_adddecryptkey':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:766: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:766: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_addencryptkey':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:802: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:802: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_sign':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:897: error: too many arguments to function 'gpgme_set_passphrase_cb'
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:898: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:898: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:902: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:907: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_encrypt':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:970: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:970: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:974: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:979: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_encryptsign':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1033: error: too many arguments to function 'gpgme_set_passphrase_cb'
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1034: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1034: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1038: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1043: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_verify':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1114: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1114: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1119: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1126: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1133: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1138: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1145: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c: In function 'zif_gnupg_decrypt':
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1196: error: too many arguments to function 'gpgme_set_passphrase_cb'
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1198: warning: assignment makes pointer from integer without a cast
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1198: error: 'GPG_ERR_NO_ERROR' undeclared (first use in this function)
/Applications/XAMPP/xamppfiles/temp/pear/temp/gnupg/gnupg.c:1201: warning: assignment makes pointer from integer without a cast
[...]
make: *** [gnupg.lo] Error 1
ERROR: `make' failed
Google не очень помог, и мои навыки интерпретации make error-output еще не достигли зрелости - я надеюсь, что кто-нибудь сможет дать мне подсказку о том, что мне нужно сделать, чтобы заставить это расширение работать!