curl - Commandline tool for transferring files with URL syntax ChangeLog

HOWTO


# cURL 8.7.1 (2024-03-27)
# ==========
# Slackware 14.0: curl 7.27.0
# Slackware 14.1: curl 7.31.0
# Slackware 14.2: curl 7.49.1
# Slackware 15.0: curl 7.81.0

# Success building with OpenSSL 1.1.1 and 3.0

# Previous versions of this howto have used the /usr/local prefix, the
# default when you build it from source.  If you want to uninstall one of
# those, or just clean up files from an old version, skip down to the bottom
# for removal instructions.

# Prerequisites:
# pkg-config
# OpenSSL or BoringSSL or LibreSSL (optional)
# zlib (optional)
# OpenLDAP (optional; for ldap:// support)
# Perl
# groff
# bison
# Kerberos (optional; for GSS-API)
# libssh2 (optional; for ssh support)
# nghttp2 (optional; for http2 support)
# librtmp (optional)
# libmetalink (optional)
# libpsl (optional)
# GNU SASL (optional)
# Brotli (optional)
# c-ares (optional; --enable-ares)
# ngtcp2 (optional; --with-ngtcp2)
# quiche (optional; --with-quiche)

# [RELEASE] curl 8.7.1 (curl-users mailing list)
# curl 8.7.1 ChangeLog
# curl releases
# Slackware64-current curl package

# Get the tarball
cd
test -f installed/curl-8.7.1.tar.xz && mv installed/curl-8.7.1.tar.xz .
test ! -f curl-8.7.1.tar.xz &&
wget https://curl.se/download/curl-8.7.1.tar.xz

# Verify tarball w/ sha256sum:
# (this came from my gpg-verified tarball)
echo "6fea2aac6a4610fbd0400afb0bcddbe7258a64c63f1f68e5855ebc0c659710\
cd  curl-8.7.1.tar.xz" | sha256sum -c

# Verify tarball w/ gpg:
# [ Key also available here:
#   https://pgp.mit.edu/pks/lookup?search=daniel%40haxx.se&op=index
#   https://daniel.haxx.se/mykey.asc ]
( gpg --list-keys B71E12C2 > /dev/null 2>&1 ||
  gpg --recv-keys B71E12C2 ) &&
wget -nc https://curl.se/download/curl-8.7.1.tar.xz.asc &&
  gpg --verify curl-8.7.1.tar.xz.asc && rm curl-8.7.1.tar.xz.asc

# Extract the source
mkdir -p -m 0700 ~/src
cd ~/src
find -maxdepth 1 -type d -name "curl-*" -exec rm -r {} \;
tar xJvf ~/curl-8.7.1.tar.xz
cd curl-8.7.1
test $UID = 0 && chown -R root:root .

# If your OpenSSL is not installed under /usr/local/ssl, pass
# --with-ssl to configure by itself with no path.  If configure
# can't find it, use LDFLAGS=-L/usr/local/ssl/lib64 or wherever libssl
# and libcrypto are.

# If you do use Slackware and your /usr/share/man is a symlink
# to /usr/man, then don't worry about the mandir part (if you're
# feeling exceptionally lazy).

# You may need LIBS="-lssl -lcrypto" to get LDAP support added successfully

# Configure the build, 64-bit with OpenSSL prefix /usr/local
# (default in >= 1.1.0)
test $(uname -m) = "x86_64" &&
test -d /usr/local/include/openssl &&
  ./configure --disable-static --prefix=/usr --libdir=/usr/lib64 \
   --mandir=/usr/man --with-ssl --with-libssh2 --enable-ldap --enable-ldaps \
   --enable-ares

# Configure the build, 64-bit with OpenSSL prefix /usr/local/ssl
test $(uname -m) = "x86_64" &&
test -d /usr/local/ssl/include &&
  LDFLAGS=-L/usr/local/ssl/lib64 ./configure --disable-static \
   --prefix=/usr --mandir=/usr/man --libdir=/usr/lib64 \
   --with-ssl=/usr/local/ssl --with-libssh2 --enable-ldap \
   --enable-ldaps --enable-ares

# Configure the build, anything else
test $(uname -m) != "x86_64" &&
./configure --disable-static --prefix=/usr --mandir=/usr/man --with-ssl \
  --with-libssh2 --enable-ldap --enable-ldaps --enable-ares

# Build it
make

# Test the build
make test

# Become root to install it
# (use 'su -p' for $USER instead of 'logname' below)
su

# Remove the Slackware package, if there is one
# Read the next few parts too before you do it
test -x /sbin/removepkg && /sbin/removepkg curl

# If you used --disable-static above but have an old static library from an
# old version of curl, remove it
rm -f /usr/lib/libcurl.a /usr/lib64/libcurl.a

# Be aware that in (at least) Slackware >= 12.2, libcurl.so.* files
# are in the aaa_elflibs|aaa_libraries package.  Not sure why, maybe
# because of gnupg and gnupg2's gpgkeys_curl/gpg2keys_curl, or maybe just
# for whatever needs them.  If you are really low on space, like on an
# embedded system, you may be able to remove the old ones (anything without
# today's date in /usr/lib or /usr/lib64).  Otherwise it will not hurt any
# to leave it there, and if anything is specifically linked with an older
# version of libcurl.so.*, then you'll be avoiding trouble by leaving it
# there.  See if any thing running is linked with it by using lsof.
#
# If you are upgrading from an older version previously installed from
# source, there may be old shared library files in there for that reason
# too.

# Install it
make install
ldconfig

# Make sure your non-root user can remove the source later
chown -R $(logname) .
chmod -R u+w .

# Become yourself again
exit

# Save the source for later
cd
mkdir -p -m 0700 installed
rm -f installed/curl-*.tar.*
mv curl-8.7.1.tar.xz installed/


# If you ever want to uninstall cURL, this should do it:
cd
su
test -d src/curl-* && ( cd src/curl-* ; make uninstall )
for pfx in /usr /usr/local;
do
  ( cd ${pfx}/bin ; rm -f curl curl-config )
  test -d ${pfx}/include/curl && rm -r ${pfx}/include/curl
  ( cd ${pfx}/share/man/man1 ; rm -f curl.1 curl-config.1 )
  test -d ${pfx}/share/curl && rm -r ${pfx}/share/curl
  rm -f ${pfx}/lib/libcurl.* ${pfx}/lib/pkgconfig/libcurl.pc \
   ${pfx}/share/man/man3/curl_*.3
done
ldconfig
exit
find ~/src -maxdepth 1 -type d -name "curl-*" -exec rm -r {} \;
rm -f ~/installed/curl-*.tar.*

List of HOWTOs

Web page itself last updated: 2023-12-20 8:06pm (EST -0500)
HOWTO last updated: 2024-04-05 2:23pm
Copyright © 2001-2024 Jason Englander. All Rights reserved.
[HTML5]