I work on a project which use cURL a lot. Recently we add a new feature to allow perform SFTP calls within our API.
SFTP is disabled by default in cURL so I tried to search how to enable it. I found that answer which helped me but during the build process I got an error about SSLv3_client_method reference.
I ran :
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-*/debian
vim rules #Append "--with-libssh2"
cd ..
sudo dpkg-buildpackage
cd ..
sudo dpkg -i curl_xxxxx.deb
sudo dpkg -i libcurl3_xxxx.deb
sudo dpkg -i libcurl3-gnutls_xxxx.deb
After the update my "rules" file contains :
cd debian/build && dh_auto_configure ${CONFIGURE_ARGS} \
--with-ca-path=/etc/ssl/certs --with-libssh2
cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS} \
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
--without-ssl --with-gnutls --with-libssh2
cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS} \
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt \
--without-ssl --with-nss --with-libssh2
Then I got the error :
../lib/.libs/libcurl.so: undefined reference to `SSLv3_client_method'
collect2: error: ld returned 1 exit status
make[4]: *** [curl] Error 1
make[4]: Leaving directory `/home/bee4/curl-7.35.0/debian/build/src'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/home/bee4/curl-7.35.0/debian/build/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/bee4/curl-7.35.0/debian/build'
dh_auto_build: make -j1 returned exit code 2
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/home/bee4/curl-7.35.0'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
I use Ubuntu 14.04 on an OVH server. Maybe I'm doing something wrong ? Also is it the right way to enable SFTP support through the cURL PHP extension (first build the right cURL version then install the PHP extension).