cURL / Mailing Lists / curl-library / Single Mail


Re: setup Issue with libssh2 libcurl and gcc

From: <>
Date: Thu, 19 Jan 2012 21:10:41 +0100


Again I burned two days getting libssh2 to work... Is there a simple
manual/ how to. I simply can not get this to work. After a lot of
attemps I decided to rollout Ubuntu again over my laptop, so more plain
then this I can not do. Here what I did. I installed a clean Ubuntu
11.10 distribution.

then downloaded the libssh2 package
sudo make

downloaded the sftp_write.c example and I tried to compile this with :

gcc -lssh2 -L/home/itops/Downloads/libssh2/libssh2-1.3.0/src -Wall -g
-O2 -o main sftp_write.c
sftp_write.c:28: fatal error: libssh2_config.h: No such file or
compilation terminated.

Please please help me in this I want to get this working. I am busy with
a big project for my work and this will help me big time.


-----Original Message-----
From: goeiespullen <>
To: goeiespullen <>
Subject: Re: setup Issue with libssh2 libcurl and gcc
Date: Tue, 17 Jan 2012 22:15:31 +0100

On Tue, 2012-01-17 at 21:39 +0100, goeiespullen wrote:
> HI,
> I want to use sftp with libcurl. I have installed libssh2 and curl with
> "configure
> --with-libssh2" (
> When compiling I get an error ('Protocol sftp not supported or disabled
> in libcurl').
> One, how to validate if my installations ( libssh2 and libcurl ) is
> correct and secondly how to link against the libraries.
> Please help me I am trying to get this working for more then two weeks
> now but I still fails :(
> Maarten
> $curl --version
> curl 7.23.1 (i686-pc-linux-gnu) libcurl/7.23.1 OpenSSL/0.9.8k
> zlib/ libidn/1.15 libssh2/1.3.0
> Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps
> pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
> Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz
> itops_at_itops-laptop:~/Downloads/libcurl/curl-7.23.1$
> $g++ first.cpp -o main -lcurl
> $./main
> Local file size: 0 bytes.
> * Protocol sftp not supported or disabled in libcurl
> * Unsupported protocol

List admin:
Received on 2012-01-19