How to enable SFTP Support in cURL?

Multi tool use
I have installed curl-7.27.0 and it is working fine how ever it is not working is run below command to find whether it is now, but it showed that :
Result of the command curl -V
root@ubuntu:~/curl-7.27.0# curl -V
curl 7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
server configuration php curl
add a comment |
I have installed curl-7.27.0 and it is working fine how ever it is not working is run below command to find whether it is now, but it showed that :
Result of the command curl -V
root@ubuntu:~/curl-7.27.0# curl -V
curl 7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
server configuration php curl
add a comment |
I have installed curl-7.27.0 and it is working fine how ever it is not working is run below command to find whether it is now, but it showed that :
Result of the command curl -V
root@ubuntu:~/curl-7.27.0# curl -V
curl 7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
server configuration php curl
I have installed curl-7.27.0 and it is working fine how ever it is not working is run below command to find whether it is now, but it showed that :
Result of the command curl -V
root@ubuntu:~/curl-7.27.0# curl -V
curl 7.21.6 (i686-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtmp rtsp smtp smtps telnet tftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
server configuration php curl
server configuration php curl
asked Oct 2 '12 at 12:55


HrishHrish
1,31983354
1,31983354
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
You have to compile curl
with sftp support first.
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-x.xx.x/debian
nano rules
find and replace "--without-libssh2" with "--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
Update the commands with the adequate versions, ofcourse. More info here.
I have gone through that when I googled it, how ever there is a small problem I am facing with in that. what you have menssioned up there is there in this link. <br/> ** 1) how ever I could not find curl-x.xx.x/debian directory or file anywhere even after extracting curl source? <br/> 2) Might be possible that I do not have an idea which is the right source? how ever the source I download is in this Curl Source
– Hrish
Oct 3 '12 at 3:32
Still I would like to thank you for at least trying to resolve the issue and request you to please check on the 2 issues that I have mentioned up here. have a gr8 time.
– Hrish
Oct 3 '12 at 3:39
Here's what I put together today based on Frantique's answer - gist.github.com/matschaffer/966b95d160d02d377700
– Mat Schaffer
Dec 21 '15 at 7:33
add a comment |
If you can't find --without-libssh2
to replace with --with-libssh2
you can search for --without-ssl
and append --with-libssh2
, tested with curl Version 7.35.0 on Ubuntu 14.04.2
Customized answer from Frantique:
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-*/debian
nano rules
Find --without-ssl
and append --with-libssh2
, in my case, it looks like this:
Before
cd debian/build && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-path=/etc/ssl/certs
cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-gnutls
cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-nss
After
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
Now build the packages:
cd ..
sudo dpkg-buildpackage
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3_*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
Here is another good tutorial for your issue.
More info on Frantique's answer.
add a comment |
Frantique's answer worked for me - however when I tried to upgrade my system, my package manager wanted to revert the installation back to a curl that does not have sftp/scp.
To avoid having to reinstall curl with sftp/scp after every upgrade:
sudo aptitude hold libcurl3
sudo aptitude hold libcurl3-gnutls
Use apt-mark if you use apt.
Read this page if you want more info on preventing updates of a specific package.
Note that eventually some future upgrade may not be able to go forward until you remove the hold.
If by chance you are using PHP and need sftp in curl - you should check out phpseclib which might be much easier to install and maintain.
Should 'curl' also be held, or is this not necessary?
– David Oliver
May 24 '16 at 21:44
add a comment |
Here is how to build curl with libssl support for Ubuntu 18.04. LTS:
sudo apt-get install build-essential debhelper libssh-dev
sudo apt-get source curl
sudo apt-get build-dep curl
cd curl-*
Download the Patch and patch the debian/rules
:
wget https://bugs.launchpad.net/ubuntu/+source/curl/+bug/311029/+attachment/5234644/+files/ubuntu_libssl.patch
sudo patch debian/rules < /ubuntu_libssl.patch
Or alternativ replace in the file the
debian/rules
:
CONFIGURE_ARGS += --without-libssh2`
with
CONFIGURE_ARGS += --with-libssh2
Then build and install the packages:
sudo dpkg-buildpackage -uc -us
# -us Do not sign the source package.
# -uc Do not sign the .changes file.
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3-*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
sudo apt-mark hold curl
sudo apt-mark hold libcurl3
sudo apt-mark hold libcurl3-gnutls
# sudo apt-mark unhold <package-name>
Hope that helps somebody.
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%2f195545%2fhow-to-enable-sftp-support-in-curl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
You have to compile curl
with sftp support first.
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-x.xx.x/debian
nano rules
find and replace "--without-libssh2" with "--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
Update the commands with the adequate versions, ofcourse. More info here.
I have gone through that when I googled it, how ever there is a small problem I am facing with in that. what you have menssioned up there is there in this link. <br/> ** 1) how ever I could not find curl-x.xx.x/debian directory or file anywhere even after extracting curl source? <br/> 2) Might be possible that I do not have an idea which is the right source? how ever the source I download is in this Curl Source
– Hrish
Oct 3 '12 at 3:32
Still I would like to thank you for at least trying to resolve the issue and request you to please check on the 2 issues that I have mentioned up here. have a gr8 time.
– Hrish
Oct 3 '12 at 3:39
Here's what I put together today based on Frantique's answer - gist.github.com/matschaffer/966b95d160d02d377700
– Mat Schaffer
Dec 21 '15 at 7:33
add a comment |
You have to compile curl
with sftp support first.
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-x.xx.x/debian
nano rules
find and replace "--without-libssh2" with "--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
Update the commands with the adequate versions, ofcourse. More info here.
I have gone through that when I googled it, how ever there is a small problem I am facing with in that. what you have menssioned up there is there in this link. <br/> ** 1) how ever I could not find curl-x.xx.x/debian directory or file anywhere even after extracting curl source? <br/> 2) Might be possible that I do not have an idea which is the right source? how ever the source I download is in this Curl Source
– Hrish
Oct 3 '12 at 3:32
Still I would like to thank you for at least trying to resolve the issue and request you to please check on the 2 issues that I have mentioned up here. have a gr8 time.
– Hrish
Oct 3 '12 at 3:39
Here's what I put together today based on Frantique's answer - gist.github.com/matschaffer/966b95d160d02d377700
– Mat Schaffer
Dec 21 '15 at 7:33
add a comment |
You have to compile curl
with sftp support first.
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-x.xx.x/debian
nano rules
find and replace "--without-libssh2" with "--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
Update the commands with the adequate versions, ofcourse. More info here.
You have to compile curl
with sftp support first.
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-x.xx.x/debian
nano rules
find and replace "--without-libssh2" with "--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
Update the commands with the adequate versions, ofcourse. More info here.
answered Oct 2 '12 at 13:02
FrantiqueFrantique
7,1172548
7,1172548
I have gone through that when I googled it, how ever there is a small problem I am facing with in that. what you have menssioned up there is there in this link. <br/> ** 1) how ever I could not find curl-x.xx.x/debian directory or file anywhere even after extracting curl source? <br/> 2) Might be possible that I do not have an idea which is the right source? how ever the source I download is in this Curl Source
– Hrish
Oct 3 '12 at 3:32
Still I would like to thank you for at least trying to resolve the issue and request you to please check on the 2 issues that I have mentioned up here. have a gr8 time.
– Hrish
Oct 3 '12 at 3:39
Here's what I put together today based on Frantique's answer - gist.github.com/matschaffer/966b95d160d02d377700
– Mat Schaffer
Dec 21 '15 at 7:33
add a comment |
I have gone through that when I googled it, how ever there is a small problem I am facing with in that. what you have menssioned up there is there in this link. <br/> ** 1) how ever I could not find curl-x.xx.x/debian directory or file anywhere even after extracting curl source? <br/> 2) Might be possible that I do not have an idea which is the right source? how ever the source I download is in this Curl Source
– Hrish
Oct 3 '12 at 3:32
Still I would like to thank you for at least trying to resolve the issue and request you to please check on the 2 issues that I have mentioned up here. have a gr8 time.
– Hrish
Oct 3 '12 at 3:39
Here's what I put together today based on Frantique's answer - gist.github.com/matschaffer/966b95d160d02d377700
– Mat Schaffer
Dec 21 '15 at 7:33
I have gone through that when I googled it, how ever there is a small problem I am facing with in that. what you have menssioned up there is there in this link. <br/> ** 1) how ever I could not find curl-x.xx.x/debian directory or file anywhere even after extracting curl source? <br/> 2) Might be possible that I do not have an idea which is the right source? how ever the source I download is in this Curl Source
– Hrish
Oct 3 '12 at 3:32
I have gone through that when I googled it, how ever there is a small problem I am facing with in that. what you have menssioned up there is there in this link. <br/> ** 1) how ever I could not find curl-x.xx.x/debian directory or file anywhere even after extracting curl source? <br/> 2) Might be possible that I do not have an idea which is the right source? how ever the source I download is in this Curl Source
– Hrish
Oct 3 '12 at 3:32
Still I would like to thank you for at least trying to resolve the issue and request you to please check on the 2 issues that I have mentioned up here. have a gr8 time.
– Hrish
Oct 3 '12 at 3:39
Still I would like to thank you for at least trying to resolve the issue and request you to please check on the 2 issues that I have mentioned up here. have a gr8 time.
– Hrish
Oct 3 '12 at 3:39
Here's what I put together today based on Frantique's answer - gist.github.com/matschaffer/966b95d160d02d377700
– Mat Schaffer
Dec 21 '15 at 7:33
Here's what I put together today based on Frantique's answer - gist.github.com/matschaffer/966b95d160d02d377700
– Mat Schaffer
Dec 21 '15 at 7:33
add a comment |
If you can't find --without-libssh2
to replace with --with-libssh2
you can search for --without-ssl
and append --with-libssh2
, tested with curl Version 7.35.0 on Ubuntu 14.04.2
Customized answer from Frantique:
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-*/debian
nano rules
Find --without-ssl
and append --with-libssh2
, in my case, it looks like this:
Before
cd debian/build && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-path=/etc/ssl/certs
cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-gnutls
cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-nss
After
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
Now build the packages:
cd ..
sudo dpkg-buildpackage
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3_*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
Here is another good tutorial for your issue.
More info on Frantique's answer.
add a comment |
If you can't find --without-libssh2
to replace with --with-libssh2
you can search for --without-ssl
and append --with-libssh2
, tested with curl Version 7.35.0 on Ubuntu 14.04.2
Customized answer from Frantique:
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-*/debian
nano rules
Find --without-ssl
and append --with-libssh2
, in my case, it looks like this:
Before
cd debian/build && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-path=/etc/ssl/certs
cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-gnutls
cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-nss
After
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
Now build the packages:
cd ..
sudo dpkg-buildpackage
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3_*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
Here is another good tutorial for your issue.
More info on Frantique's answer.
add a comment |
If you can't find --without-libssh2
to replace with --with-libssh2
you can search for --without-ssl
and append --with-libssh2
, tested with curl Version 7.35.0 on Ubuntu 14.04.2
Customized answer from Frantique:
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-*/debian
nano rules
Find --without-ssl
and append --with-libssh2
, in my case, it looks like this:
Before
cd debian/build && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-path=/etc/ssl/certs
cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-gnutls
cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-nss
After
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
Now build the packages:
cd ..
sudo dpkg-buildpackage
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3_*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
Here is another good tutorial for your issue.
More info on Frantique's answer.
If you can't find --without-libssh2
to replace with --with-libssh2
you can search for --without-ssl
and append --with-libssh2
, tested with curl Version 7.35.0 on Ubuntu 14.04.2
Customized answer from Frantique:
Download and unpack the curl source. After that:
sudo apt-get install build-essential debhelper libssh2-1-dev
sudo apt-get source libcurl3
sudo apt-get build-dep libcurl3
cd curl-*/debian
nano rules
Find --without-ssl
and append --with-libssh2
, in my case, it looks like this:
Before
cd debian/build && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-path=/etc/ssl/certs
cd debian/build-gnutls && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-gnutls
cd debian/build-nss && dh_auto_configure ${CONFIGURE_ARGS}
--with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
--without-ssl --with-nss
After
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
Now build the packages:
cd ..
sudo dpkg-buildpackage
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3_*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
Here is another good tutorial for your issue.
More info on Frantique's answer.
edited Oct 2 '15 at 19:24
guntbert
9,282133170
9,282133170
answered Jun 30 '15 at 12:29
JumpLinkJumpLink
17113
17113
add a comment |
add a comment |
Frantique's answer worked for me - however when I tried to upgrade my system, my package manager wanted to revert the installation back to a curl that does not have sftp/scp.
To avoid having to reinstall curl with sftp/scp after every upgrade:
sudo aptitude hold libcurl3
sudo aptitude hold libcurl3-gnutls
Use apt-mark if you use apt.
Read this page if you want more info on preventing updates of a specific package.
Note that eventually some future upgrade may not be able to go forward until you remove the hold.
If by chance you are using PHP and need sftp in curl - you should check out phpseclib which might be much easier to install and maintain.
Should 'curl' also be held, or is this not necessary?
– David Oliver
May 24 '16 at 21:44
add a comment |
Frantique's answer worked for me - however when I tried to upgrade my system, my package manager wanted to revert the installation back to a curl that does not have sftp/scp.
To avoid having to reinstall curl with sftp/scp after every upgrade:
sudo aptitude hold libcurl3
sudo aptitude hold libcurl3-gnutls
Use apt-mark if you use apt.
Read this page if you want more info on preventing updates of a specific package.
Note that eventually some future upgrade may not be able to go forward until you remove the hold.
If by chance you are using PHP and need sftp in curl - you should check out phpseclib which might be much easier to install and maintain.
Should 'curl' also be held, or is this not necessary?
– David Oliver
May 24 '16 at 21:44
add a comment |
Frantique's answer worked for me - however when I tried to upgrade my system, my package manager wanted to revert the installation back to a curl that does not have sftp/scp.
To avoid having to reinstall curl with sftp/scp after every upgrade:
sudo aptitude hold libcurl3
sudo aptitude hold libcurl3-gnutls
Use apt-mark if you use apt.
Read this page if you want more info on preventing updates of a specific package.
Note that eventually some future upgrade may not be able to go forward until you remove the hold.
If by chance you are using PHP and need sftp in curl - you should check out phpseclib which might be much easier to install and maintain.
Frantique's answer worked for me - however when I tried to upgrade my system, my package manager wanted to revert the installation back to a curl that does not have sftp/scp.
To avoid having to reinstall curl with sftp/scp after every upgrade:
sudo aptitude hold libcurl3
sudo aptitude hold libcurl3-gnutls
Use apt-mark if you use apt.
Read this page if you want more info on preventing updates of a specific package.
Note that eventually some future upgrade may not be able to go forward until you remove the hold.
If by chance you are using PHP and need sftp in curl - you should check out phpseclib which might be much easier to install and maintain.
edited Apr 13 '17 at 12:24
Community♦
1
1
answered May 30 '13 at 0:10
user12345user12345
2,4211117
2,4211117
Should 'curl' also be held, or is this not necessary?
– David Oliver
May 24 '16 at 21:44
add a comment |
Should 'curl' also be held, or is this not necessary?
– David Oliver
May 24 '16 at 21:44
Should 'curl' also be held, or is this not necessary?
– David Oliver
May 24 '16 at 21:44
Should 'curl' also be held, or is this not necessary?
– David Oliver
May 24 '16 at 21:44
add a comment |
Here is how to build curl with libssl support for Ubuntu 18.04. LTS:
sudo apt-get install build-essential debhelper libssh-dev
sudo apt-get source curl
sudo apt-get build-dep curl
cd curl-*
Download the Patch and patch the debian/rules
:
wget https://bugs.launchpad.net/ubuntu/+source/curl/+bug/311029/+attachment/5234644/+files/ubuntu_libssl.patch
sudo patch debian/rules < /ubuntu_libssl.patch
Or alternativ replace in the file the
debian/rules
:
CONFIGURE_ARGS += --without-libssh2`
with
CONFIGURE_ARGS += --with-libssh2
Then build and install the packages:
sudo dpkg-buildpackage -uc -us
# -us Do not sign the source package.
# -uc Do not sign the .changes file.
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3-*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
sudo apt-mark hold curl
sudo apt-mark hold libcurl3
sudo apt-mark hold libcurl3-gnutls
# sudo apt-mark unhold <package-name>
Hope that helps somebody.
add a comment |
Here is how to build curl with libssl support for Ubuntu 18.04. LTS:
sudo apt-get install build-essential debhelper libssh-dev
sudo apt-get source curl
sudo apt-get build-dep curl
cd curl-*
Download the Patch and patch the debian/rules
:
wget https://bugs.launchpad.net/ubuntu/+source/curl/+bug/311029/+attachment/5234644/+files/ubuntu_libssl.patch
sudo patch debian/rules < /ubuntu_libssl.patch
Or alternativ replace in the file the
debian/rules
:
CONFIGURE_ARGS += --without-libssh2`
with
CONFIGURE_ARGS += --with-libssh2
Then build and install the packages:
sudo dpkg-buildpackage -uc -us
# -us Do not sign the source package.
# -uc Do not sign the .changes file.
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3-*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
sudo apt-mark hold curl
sudo apt-mark hold libcurl3
sudo apt-mark hold libcurl3-gnutls
# sudo apt-mark unhold <package-name>
Hope that helps somebody.
add a comment |
Here is how to build curl with libssl support for Ubuntu 18.04. LTS:
sudo apt-get install build-essential debhelper libssh-dev
sudo apt-get source curl
sudo apt-get build-dep curl
cd curl-*
Download the Patch and patch the debian/rules
:
wget https://bugs.launchpad.net/ubuntu/+source/curl/+bug/311029/+attachment/5234644/+files/ubuntu_libssl.patch
sudo patch debian/rules < /ubuntu_libssl.patch
Or alternativ replace in the file the
debian/rules
:
CONFIGURE_ARGS += --without-libssh2`
with
CONFIGURE_ARGS += --with-libssh2
Then build and install the packages:
sudo dpkg-buildpackage -uc -us
# -us Do not sign the source package.
# -uc Do not sign the .changes file.
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3-*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
sudo apt-mark hold curl
sudo apt-mark hold libcurl3
sudo apt-mark hold libcurl3-gnutls
# sudo apt-mark unhold <package-name>
Hope that helps somebody.
Here is how to build curl with libssl support for Ubuntu 18.04. LTS:
sudo apt-get install build-essential debhelper libssh-dev
sudo apt-get source curl
sudo apt-get build-dep curl
cd curl-*
Download the Patch and patch the debian/rules
:
wget https://bugs.launchpad.net/ubuntu/+source/curl/+bug/311029/+attachment/5234644/+files/ubuntu_libssl.patch
sudo patch debian/rules < /ubuntu_libssl.patch
Or alternativ replace in the file the
debian/rules
:
CONFIGURE_ARGS += --without-libssh2`
with
CONFIGURE_ARGS += --with-libssh2
Then build and install the packages:
sudo dpkg-buildpackage -uc -us
# -us Do not sign the source package.
# -uc Do not sign the .changes file.
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3-*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
sudo apt-mark hold curl
sudo apt-mark hold libcurl3
sudo apt-mark hold libcurl3-gnutls
# sudo apt-mark unhold <package-name>
Hope that helps somebody.
edited Jan 31 at 14:51
answered Jan 31 at 13:45


wittichwittich
795716
795716
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%2f195545%2fhow-to-enable-sftp-support-in-curl%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
ashcfNI3yi,V44T