/usr/bin/ld: cannot find -lz
I'm trying to install lxml on a virtual machine running ubuntu/trusty64 in a virtualenv however i get this error below and can't get my head around it.
/usr/bin/ld: cannot find -lz
the first time this error occurred i looked into installing lz. i installed it using sudo apt-get install mtools which contains lz however the error still occurs therefore i'm thinking this could be a symbolic link problem maybe a file is supposed to be linked to lz but not sure what file. lz has a symlink to uz but i dont know what effect that has and don't want to change that incase it breaks something else. any ideas to point me in the right direction?
building 'lxml.etree' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/lxml
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
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 -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /home/vagrant/.virtualenvs/devenv/bin/python -c "import setuptools, tokenize;__file__='/home/vagrant/.virtualenvs/devenv/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-yUqdLy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/.virtualenvs/devenv/include/site/python2.7 failed with error code 1 in /home/vagrant/.virtualenvs/devenv/build/lxml
Storing debug log for failure in /home/vagrant/.pip/pip.log
(devenv)vagrant@vagrant-ubuntu-trusty-64:/vagrant/woowoo/woowoo_webapp$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ vim /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld.bfd
-rwxr-xr-x 1 root root 1050912 Sep 16 16:10 /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ ls -l /usr/bin/lzlrwxrwxrwx 1 root root 2 Oct 10 2013 /usr/bin/lz -> uz
(devenv)$ ls -l /usr/bin/uz
-rwxr-xr-x 1 root root 2496 Oct 10 2013 /usr/bin/uz
virtualbox
add a comment |
I'm trying to install lxml on a virtual machine running ubuntu/trusty64 in a virtualenv however i get this error below and can't get my head around it.
/usr/bin/ld: cannot find -lz
the first time this error occurred i looked into installing lz. i installed it using sudo apt-get install mtools which contains lz however the error still occurs therefore i'm thinking this could be a symbolic link problem maybe a file is supposed to be linked to lz but not sure what file. lz has a symlink to uz but i dont know what effect that has and don't want to change that incase it breaks something else. any ideas to point me in the right direction?
building 'lxml.etree' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/lxml
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
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 -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /home/vagrant/.virtualenvs/devenv/bin/python -c "import setuptools, tokenize;__file__='/home/vagrant/.virtualenvs/devenv/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-yUqdLy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/.virtualenvs/devenv/include/site/python2.7 failed with error code 1 in /home/vagrant/.virtualenvs/devenv/build/lxml
Storing debug log for failure in /home/vagrant/.pip/pip.log
(devenv)vagrant@vagrant-ubuntu-trusty-64:/vagrant/woowoo/woowoo_webapp$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ vim /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld.bfd
-rwxr-xr-x 1 root root 1050912 Sep 16 16:10 /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ ls -l /usr/bin/lzlrwxrwxrwx 1 root root 2 Oct 10 2013 /usr/bin/lz -> uz
(devenv)$ ls -l /usr/bin/uz
-rwxr-xr-x 1 root root 2496 Oct 10 2013 /usr/bin/uz
virtualbox
add a comment |
I'm trying to install lxml on a virtual machine running ubuntu/trusty64 in a virtualenv however i get this error below and can't get my head around it.
/usr/bin/ld: cannot find -lz
the first time this error occurred i looked into installing lz. i installed it using sudo apt-get install mtools which contains lz however the error still occurs therefore i'm thinking this could be a symbolic link problem maybe a file is supposed to be linked to lz but not sure what file. lz has a symlink to uz but i dont know what effect that has and don't want to change that incase it breaks something else. any ideas to point me in the right direction?
building 'lxml.etree' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/lxml
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
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 -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /home/vagrant/.virtualenvs/devenv/bin/python -c "import setuptools, tokenize;__file__='/home/vagrant/.virtualenvs/devenv/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-yUqdLy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/.virtualenvs/devenv/include/site/python2.7 failed with error code 1 in /home/vagrant/.virtualenvs/devenv/build/lxml
Storing debug log for failure in /home/vagrant/.pip/pip.log
(devenv)vagrant@vagrant-ubuntu-trusty-64:/vagrant/woowoo/woowoo_webapp$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ vim /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld.bfd
-rwxr-xr-x 1 root root 1050912 Sep 16 16:10 /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ ls -l /usr/bin/lzlrwxrwxrwx 1 root root 2 Oct 10 2013 /usr/bin/lz -> uz
(devenv)$ ls -l /usr/bin/uz
-rwxr-xr-x 1 root root 2496 Oct 10 2013 /usr/bin/uz
virtualbox
I'm trying to install lxml on a virtual machine running ubuntu/trusty64 in a virtualenv however i get this error below and can't get my head around it.
/usr/bin/ld: cannot find -lz
the first time this error occurred i looked into installing lz. i installed it using sudo apt-get install mtools which contains lz however the error still occurs therefore i'm thinking this could be a symbolic link problem maybe a file is supposed to be linked to lz but not sure what file. lz has a symlink to uz but i dont know what effect that has and don't want to change that incase it breaks something else. any ideas to point me in the right direction?
building 'lxml.etree' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/lxml
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/libxml2 -Isrc/lxml/includes -I/usr/include/python2.7 -c src/lxml/lxml.etree.c -o build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -w
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 -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-x86_64-2.7/lxml/etree.so
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /home/vagrant/.virtualenvs/devenv/bin/python -c "import setuptools, tokenize;__file__='/home/vagrant/.virtualenvs/devenv/build/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /tmp/pip-yUqdLy-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/vagrant/.virtualenvs/devenv/include/site/python2.7 failed with error code 1 in /home/vagrant/.virtualenvs/devenv/build/lxml
Storing debug log for failure in /home/vagrant/.pip/pip.log
(devenv)vagrant@vagrant-ubuntu-trusty-64:/vagrant/woowoo/woowoo_webapp$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ vim /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld.bfd
-rwxr-xr-x 1 root root 1050912 Sep 16 16:10 /usr/bin/ld.bfd
(devenv)$ ls -l /usr/bin/ld
lrwxrwxrwx 1 root root 6 Sep 16 16:11 /usr/bin/ld -> ld.bfd
(devenv)$ ls -l /usr/bin/lzlrwxrwxrwx 1 root root 2 Oct 10 2013 /usr/bin/lz -> uz
(devenv)$ ls -l /usr/bin/uz
-rwxr-xr-x 1 root root 2496 Oct 10 2013 /usr/bin/uz
virtualbox
virtualbox
asked Jan 4 '16 at 21:16
JoelJoel
2314
2314
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
You need to install the build dependencies of lxml in order to compile it. Try doing sudo apt-get build-dep python-lxml
if you have source package data enabled in your apt sources.
What is missing is not the lz
command, but the development files for the zlib library. You need to install zlib1g-dev
to get this.
1
perfect that did the trick! i didn't know about building dependancies in order to compile but that makes perfect sense. thanks for teaching me something and solving my problem
– Joel
Jan 4 '16 at 21:53
add a comment |
Try one of those three :
sudo apt-get install zlib1g-dev
sudo apt-get install libz-dev
sudo apt-get install lib32z1-dev
wish will work for you
reference to “/usr/bin/ld: cannot find -lz” for more details.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f716945%2fusr-bin-ld-cannot-find-lz%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
You need to install the build dependencies of lxml in order to compile it. Try doing sudo apt-get build-dep python-lxml
if you have source package data enabled in your apt sources.
What is missing is not the lz
command, but the development files for the zlib library. You need to install zlib1g-dev
to get this.
1
perfect that did the trick! i didn't know about building dependancies in order to compile but that makes perfect sense. thanks for teaching me something and solving my problem
– Joel
Jan 4 '16 at 21:53
add a comment |
You need to install the build dependencies of lxml in order to compile it. Try doing sudo apt-get build-dep python-lxml
if you have source package data enabled in your apt sources.
What is missing is not the lz
command, but the development files for the zlib library. You need to install zlib1g-dev
to get this.
1
perfect that did the trick! i didn't know about building dependancies in order to compile but that makes perfect sense. thanks for teaching me something and solving my problem
– Joel
Jan 4 '16 at 21:53
add a comment |
You need to install the build dependencies of lxml in order to compile it. Try doing sudo apt-get build-dep python-lxml
if you have source package data enabled in your apt sources.
What is missing is not the lz
command, but the development files for the zlib library. You need to install zlib1g-dev
to get this.
You need to install the build dependencies of lxml in order to compile it. Try doing sudo apt-get build-dep python-lxml
if you have source package data enabled in your apt sources.
What is missing is not the lz
command, but the development files for the zlib library. You need to install zlib1g-dev
to get this.
answered Jan 4 '16 at 21:21
dobeydobey
32.8k33686
32.8k33686
1
perfect that did the trick! i didn't know about building dependancies in order to compile but that makes perfect sense. thanks for teaching me something and solving my problem
– Joel
Jan 4 '16 at 21:53
add a comment |
1
perfect that did the trick! i didn't know about building dependancies in order to compile but that makes perfect sense. thanks for teaching me something and solving my problem
– Joel
Jan 4 '16 at 21:53
1
1
perfect that did the trick! i didn't know about building dependancies in order to compile but that makes perfect sense. thanks for teaching me something and solving my problem
– Joel
Jan 4 '16 at 21:53
perfect that did the trick! i didn't know about building dependancies in order to compile but that makes perfect sense. thanks for teaching me something and solving my problem
– Joel
Jan 4 '16 at 21:53
add a comment |
Try one of those three :
sudo apt-get install zlib1g-dev
sudo apt-get install libz-dev
sudo apt-get install lib32z1-dev
wish will work for you
reference to “/usr/bin/ld: cannot find -lz” for more details.
add a comment |
Try one of those three :
sudo apt-get install zlib1g-dev
sudo apt-get install libz-dev
sudo apt-get install lib32z1-dev
wish will work for you
reference to “/usr/bin/ld: cannot find -lz” for more details.
add a comment |
Try one of those three :
sudo apt-get install zlib1g-dev
sudo apt-get install libz-dev
sudo apt-get install lib32z1-dev
wish will work for you
reference to “/usr/bin/ld: cannot find -lz” for more details.
Try one of those three :
sudo apt-get install zlib1g-dev
sudo apt-get install libz-dev
sudo apt-get install lib32z1-dev
wish will work for you
reference to “/usr/bin/ld: cannot find -lz” for more details.
answered Jan 31 at 19:57
DINA TAKLITDINA TAKLIT
1034
1034
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f716945%2fusr-bin-ld-cannot-find-lz%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown