How do I build libcurl from source?
Your permissions here don't matter, the reason you are getting that error is that it can't find the configure
file.
In this case curl includes a buildconf
file to prepare this for you. I successfully compiled it by doing the following steps.
First I make sure I have everything I need to build curl:
sudo apt-get build-dep curl
And then I run the following commands to build it:
buildconf
./configure
make
sudo make install
This will put the library in /usr/local/
Looking at the sources, it seems like libcurl can use both cmake and autotools. Cmake is easiest:
cmake .
to create the build files, then
make
sudo make install
like you're used to.
For reference, here's how to use autotools. It is unusual for a git checkout to contain the configure
script. You should expect an autogen.sh
script (which creates and calls configure
for you), or, failing that:
autoreconf --install
./configure
make
sudo make install
Both ways seem to work for libcurl.
If you're on Ubuntu 13.04 you might need to
ln -s /usr/local/lib/libcurl.so /usr/lib/libcurl.so
so curl finds its way.