I'm having the exact same problem with the latest versions of R, curl, and CentOS:
handle.c:30:1: error: unknown type name ‘curl_sslbackend’
To my limited knowledge, something seems to have broken in the interaction between R's "curl" and the curl headers.
curl-config --cflags was blank, implying the development headers were already on the path.
Within R, capabilities("libcurl") return libcurl TRUE.
The only workaround I could find was to rely on an earlier snapshot of CRAN:
install.packages(c("httr"), repos="http://mran.revolutionanalytics.com/snapshot/2019-01-06/")
Here's more info about my system:
R version 3.6.0
CentOS Linux release 7.6.1810 (Core)
Linux 90912a1aeac3 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.36 zlib/1.2.7 libidn/1.28 libssh2/1.4.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz unix-sockets
Installed Packages
curl.x86_64, 7.29.0-51.el7_6.3
libcurl.x86_64, 7.29.0-51.el7_6.3
libcurl-devel.x86_64, 7.29.0-51.el7_6.3