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
SFTP 프로토콜을 어떻게 활성화합니까?
답변
curl
먼저 sftp 지원 으로 컴파일해야합니다 .
컬 소스를 다운로드하고 포장을 풉니 다. 그 후 :
sudo apt-get install 빌드 필수 debhelper libssh2-1-dev sudo apt-get 소스 libcurl3 sudo apt-get 빌드-뎁 libcurl3 cd curl-x.xx.x / debian 나노 규칙
“–without-libssh2″를 찾아 “–with-libssh2″로 바꿉니다.
cd .. sudo dpkg- 빌드 패키지 cd .. sudo dpkg -i curl_xxxxx.deb sudo dpkg -i libcurl3_xxxx.deb sudo dpkg -i libcurl3-gnutls_xxxx.deb
물론 적절한 버전으로 명령을 업데이트하십시오. 자세한 내용은 여기를 참조하십시오 .
답변
당신은 찾을 수없는 경우 --without-libssh2
에 대체 --with-libssh2
를 검색 할 수 있습니다 --without-ssl
및 APPEND --with-libssh2
버전, 컬 테스트 7.35.0을 에 우분투 14.04.2
Frantique의 맞춤형 답변 :
컬 소스를 다운로드하고 포장을 풉니 다. 그 후 :
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
찾기 --without-ssl
및 APPEND --with-libssh2
, 내 경우에는, 그것은 다음과 같습니다 :
전에
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
후
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
이제 패키지를 빌드하십시오.
cd ..
sudo dpkg-buildpackage
cd ..
sudo dpkg -i curl_*.deb
sudo dpkg -i libcurl3_*.deb
sudo dpkg -i libcurl3-gnutls_*.deb
다음은 문제에 대한 또 다른 유용한 자습서 입니다.
Frantique의 답변에 대한 자세한 정보.
답변
Frantique의 대답은 저에게 효과적이었습니다.하지만 시스템을 업그레이드하려고 할 때 패키지 관리자는 sftp / scp가없는 curl로 설치를 되돌리려 고했습니다.
업그레이드 할 때마다 sftp / scp로 curl을 다시 설치하지 않으려면 :
sudo aptitude hold libcurl3
sudo aptitude hold libcurl3-gnutls
apt를 사용하는 경우 apt-mark를 사용하십시오.
특정 패키지의 업데이트 방지에 대한 자세한 내용을 보려면이 페이지를 읽으십시오 .
결과적으로 보류를 제거 할 때까지 향후 일부 업그레이드가 진행되지 않을 수 있습니다.
우연히 PHP를 사용하고 curl에서 sftp가 필요한 경우 설치 및 유지 관리가 훨씬 쉬운 phpseclib 를 확인해야 합니다.
답변
Ubuntu 18.04에 대한 libssl 지원으로 curl을 빌드하는 방법은 다음과 같습니다. LTS :
sudo apt-get install build-essential debhelper libssh-dev
sudo apt-get source curl
sudo apt-get build-dep curl
cd curl-*
패치를 다운로드하고 다음을 패치하십시오 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
-
또는 alternativ 는 파일에서
debian/rules
다음을 대체합니다 .CONFIGURE_ARGS += --without-libssh2`
와
CONFIGURE_ARGS += --with-libssh2
그런 다음 패키지를 빌드하고 설치하십시오.
sudo dpkg-buildpackage -uc -us -b
# -us Do not sign the source package.
# -uc Do not sign the .changes file.
# -b Do not try to apply changes to the unpacked upstream
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>
누군가에게 도움이되기를 바랍니다.