Hetzner - DokuWiki

Curl fuer sftp/en

Inhaltsverzeichnis

Curl with sftp

If you wish to use curl, for example to create a backup with Tartarus, the following error message is shown with a default Ubuntu installation:

Protocol sftp not supported or disabled in libcurl

This can be fixed through manual compilation.

Activate Debian Sources

In the file etc/apt/sources.list add

deb-src http://archive.ubuntu.com/ubuntu/ oneiric main restricted universe

if there is no source code available. The sources used should match the distribution being used. Check /etc/apt/sources.list and configure for example the following:

cat /etc/apt/sources.list.d/sources.list
deb-src http://archive.ubuntu.com/ubuntu/   precise           main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/   precise-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/   precise-updates   main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/   precise-security  main restricted universe multiverse

Otherwise, you may get "Unmet dependencies", with apt-transport-https for example.

Load Debian Sources

mkdir -p /tmp/curl
cd /tmp/curl
apt-get update
apt-get install build-essential debhelper libssh2-1-dev
apt-get source libcurl3
apt-get build-dep libcurl3

Adjust the Sources

#possibly adjust the version number
cd curl-7.21.6/debian
#process rules file
vi rules

Change

–without-libssh2

to

-with-libssh2

Build the Packets

cd ..
dpkg-buildpackage
cd ..
dpkg -i curl_7.21.6-3ubuntu3_amd64.deb
dpkg -i libcurl3_7.21.6-3ubuntu3_amd64.deb
dpkg -i libcurl3-gnutls_7.21.6-3ubuntu3_amd64.deb
mkdir -p ~/temp/curl
cd ~/temp/curl

Install the Packets

apt-get install build-essential debhelper libssh2-1-dev
apt-get source libcurl3
apt-get build-dep libcurl3

It should work now. The folder can now be deleted

rm -rf /tmp/curl

This tutorial is based on http://blog.fbs-fulda.info/?p=464



© 2016. Hetzner Online GmbH. Alle Rechte vorbehalten.