Reputation: 167
I am trying to install monary, and getting the following error:
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/monary/cmonary.o -L/usr/local/lib -L/usr/local/lib -lbson-1.0 -lcrypto -lssl -lsasl2 -lmongoc-1.0 -o build/lib.linux-x86_64-2.7/monary/libcmonary.so
/usr/bin/ld: cannot find -lsasl2
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I looked at usr-bin-ld-cannot-find-lz, but still don't know which package is lsasl2 part of? (So that I could sudo apt-get it )
Also ld
is not a part of /usr/bin/
as a directory. It is a linux x86 executable
. How should I go about to resolve this?
I use 16.04.4 LTS xenial Ubuntu. Complete error and execution is shown below:
Collecting monary
Downloading https://files.pythonhosted.org/packages/35/b6/230a3ec114337e324f372106b83a88efe2043f9adda551292ff57cc1262d/Monary-0.5.0.tar.gz
Requirement already satisfied: pymongo in /usr/local/lib/python2.7/dist-packages (from monary) (3.6.1)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/dist-packages (from monary) (1.14.1)
Installing collected packages: monary
Running setup.py install for monary ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-nyaKSj/monary/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-7Lj0Ng/install-record.txt --single-version-externally-managed --compile:
/tmp/pip-install-nyaKSj/monary/setup.py:90: UserWarning: WARNING: the python package pkgconfig is not installed. If you have pkg-config installed on your system, please install the python's pkgconfig, e.g. "pip install pkgconfig". Will use libmongoc=/usr/local and libbson=/usr/local instead.
% (mongoc_src, bson_src)))
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/monary.py -> build/lib.linux-x86_64-2.7/monary
copying monary/ordereddict.py -> build/lib.linux-x86_64-2.7/monary
copying monary/write_concern.py -> build/lib.linux-x86_64-2.7/monary
copying monary/__init__.py -> build/lib.linux-x86_64-2.7/monary
copying monary/datehelper.py -> build/lib.linux-x86_64-2.7/monary
copying monary/monary_param.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 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/include/libmongoc-1.0 -I/usr/local/include/libbson-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_init_query’:
monary/cmonary.c:910:5: warning: ‘mongoc_collection_find’ is deprecated: Use mongoc_collection_find_with_opts instead [-Wdeprecated-declarations]
mcursor = mongoc_collection_find(collection,
^
In file included from /usr/local/include/libmongoc-1.0/mongoc-client.h:28:0,
from /usr/local/include/libmongoc-1.0/mongoc.h:29,
from monary/cmonary.c:8:
/usr/local/include/libmongoc-1.0/mongoc-collection.h:155:1: note: declared here
mongoc_collection_find (mongoc_collection_t *collection,
^
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_create_write_concern’:
monary/cmonary.c:1100:5: warning: ‘mongoc_write_concern_set_fsync’ is deprecated [-Wdeprecated-declarations]
mongoc_write_concern_set_fsync(write_concern, write_concern_fsync);
^
In file included from /usr/local/include/libmongoc-1.0/mongoc-bulk-operation.h:25:0,
from /usr/local/include/libmongoc-1.0/mongoc.h:27,
from monary/cmonary.c:8:
/usr/local/include/libmongoc-1.0/mongoc-write-concern.h:51:1: note: declared here
mongoc_write_concern_set_fsync (mongoc_write_concern_t *write_concern,
^
monary/cmonary.c: In function ‘monary_insert’:
monary/cmonary.c:1398:5: warning: ‘mongoc_collection_create_bulk_operation’ is deprecated: Use mongoc_collection_create_bulk_operation_with_opts instead [-Wdeprecated-declarations]
bulk_op = mongoc_collection_create_bulk_operation(collection, false,
^
In file included from /usr/local/include/libmongoc-1.0/mongoc-client.h:28:0,
from /usr/local/include/libmongoc-1.0/mongoc.h:29,
from monary/cmonary.c:8:
/usr/local/include/libmongoc-1.0/mongoc-collection.h:296:1: note: declared here
mongoc_collection_create_bulk_operation (
^
monary/cmonary.c:1406:5: warning: ‘mongoc_client_get_max_message_size’ is deprecated [-Wdeprecated-declarations]
max_message_size = mongoc_client_get_max_message_size(client);
^
In file included from /usr/local/include/libmongoc-1.0/mongoc.h:29:0,
from monary/cmonary.c:8:
/usr/local/include/libmongoc-1.0/mongoc-client.h:212:1: note: declared here
mongoc_client_get_max_message_size (mongoc_client_t *client)
^
monary/cmonary.c:1489:13: warning: ‘mongoc_collection_create_bulk_operation’ is deprecated: Use mongoc_collection_create_bulk_operation_with_opts instead [-Wdeprecated-declarations]
bulk_op = mongoc_collection_create_bulk_operation(collection,
^
In file included from /usr/local/include/libmongoc-1.0/mongoc-client.h:28:0,
from /usr/local/include/libmongoc-1.0/mongoc.h:29,
from monary/cmonary.c:8:
/usr/local/include/libmongoc-1.0/mongoc-collection.h:296:1: note: declared here
mongoc_collection_create_bulk_operation (
^
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;
^
monary/cmonary.c:1430:13: warning: ‘storage’ may be used uninitialized in this function [-Wmaybe-uninitialized]
bson_oid_init_from_data(&oid,
^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/monary/cmonary.o -L/usr/local/lib -L/usr/local/lib -lbson-1.0 -lcrypto -lssl -lsasl2 -lmongoc-1.0 -o build/lib.linux-x86_64-2.7/monary/libcmonary.so
/usr/bin/ld: cannot find -lsasl2
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I wanted to install monary such that I don't have to use pd.DataFrame(list())
which is super slow for 300 thousand properties.
Upvotes: 0
Views: 1913
Reputation: 167
Solved it by using:
sudo apt-get install libsasl2-dev
I inferred from the linked question
that if -lz
corresponds to libz-dev
then -lsasl2
should correspond to libsasl2-dev
.
Upvotes: 2