我一直在尝试在运行 Ubuntu 14.04.1 LTS 的 VM 上安装 Monary,但没有成功。我已经安装了 Mongo C 驱动程序,我认为这已经正确完成了。
为全文道歉。
[更新:启用 ssl 和 sasl 使用:
sudo apt-get install -y libsasl2-dev libssl-dev
然后
./configure --enable-ssl --enable-sas
]
使用
sudo pip install monary #or even without sudo
[现在]给出:
Downloading/unpacking monary
Downloading Monary-0.4.0.post2.tar.gz
Running setup.py (path:/tmp/pip_build_root/monary/setup.py) egg_info for package monary
warning: no previously-included files matching '*.py' found under directory 'test'
warning: no previously-included files matching '*.py' found under directory 'timing'
Installing collected packages: monary
Running setup.py install for monary
building 'monary.libcmonary' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/libbson-1.0 -I/usr/local/include/libmongoc-1.0 -I/usr/include/python2.7 -c monary/cmonary.c -o build/temp.linux-x86_64-2.7/monary/cmonary.o -fPIC -O2 -DNDEBUG
monary/cmonary.c: In function ‘monary_connect’:
monary/cmonary.c:130:9: error: unknown type name ‘mongoc_ssl_opt_t’
mongoc_ssl_opt_t opts = { pem_file, pem_pwd, ca_file, ca_dir, crl_file,
^
monary/cmonary.c:130:9: warning: initialization makes integer from pointer without a cast [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:132:9: warning: excess elements in scalar initializer [enabled by default]
};
^
monary/cmonary.c:132:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:133:9: warning: implicit declaration of function ‘mongoc_client_set_ssl_opts’ [-Wimplicit-function-declaration]
mongoc_client_set_ssl_opts(client, &opts);
^
monary/cmonary.c: In function ‘monary_load_query’:
monary/cmonary.c:1018:9: warning: variable ‘total_values’ set but not used [-Wunused-but-set-variable]
int total_values;
^
monary/cmonary.c: In function ‘monary_insert’:
monary/cmonary.c:1374:11: warning: unused variable ‘str’ [-Wunused-variable]
char *str;
^
monary/cmonary.c:1368:25: warning: unused variable ‘citem’ [-Wunused-variable]
monary_column_item *citem;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/monary/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-2kCMXO-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/monary
copying monary/ordereddict.py -> build/lib.linux-x86_64-2.7/monary
copying monary/monary.py -> build/lib.linux-x86_64-2.7/monary
copying monary/monary_param.py -> build/lib.linux-x86_64-2.7/monary
copying monary/datehelper.py -> build/lib.linux-x86_64-2.7/monary
copying monary/__init__.py -> build/lib.linux-x86_64-2.7/monary
copying monary/write_concern.py -> build/lib.linux-x86_64-2.7/monary
running build_ext
building 'monary.libcmonary' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/monary
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/libbson-1.0 -I/usr/local/include/libmongoc-1.0 -I/usr/include/python2.7 -c monary/cmonary.c -o build/temp.linux-x86_64-2.7/monary/cmonary.o -fPIC -O2 -DNDEBUG
monary/cmonary.c: In function ‘monary_connect’:
monary/cmonary.c:130:9: error: unknown type name ‘mongoc_ssl_opt_t’
mongoc_ssl_opt_t opts = { pem_file, pem_pwd, ca_file, ca_dir, crl_file,
^
monary/cmonary.c:130:9: warning: initialization makes integer from pointer without a cast [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:130:9: warning: excess elements in scalar initializer [enabled by default]
monary/cmonary.c:130:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:132:9: warning: excess elements in scalar initializer [enabled by default]
};
^
monary/cmonary.c:132:9: warning: (near initialization for ‘opts’) [enabled by default]
monary/cmonary.c:133:9: warning: implicit declaration of function ‘mongoc_client_set_ssl_opts’ [-Wimplicit-function-declaration]
mongoc_client_set_ssl_opts(client, &opts);
^
monary/cmonary.c: In function ‘monary_load_query’:
monary/cmonary.c:1018:9: warning: variable ‘total_values’ set but not used [-Wunused-but-set-variable]
int total_values;
^
monary/cmonary.c: In function ‘monary_insert’:
monary/cmonary.c:1374:11: warning: unused variable ‘str’ [-Wunused-variable]
char *str;
^
monary/cmonary.c:1368:25: warning: unused variable ‘citem’ [-Wunused-variable]
monary_column_item *citem;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/monary/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-2kCMXO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/monary
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in <module>
load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 235, in main
return command.main(cmd_args)
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 34: ordinal not in range(128)
我尝试重新安装/更新一些看起来相关但没有任何效果的软件包,我无法确定问题所在。
任何帮助表示赞赏。谢谢!