Mac – Install wget on Mac

macterminal

I downloaded wget-1.19.tar.gz from this site http://ftp.gnu.org/gnu/wget/ and then i exctract the tar file and run

./configure

The output is that:

checking for ftello... yes
checking for sigblock... yes
checking for sigsetjmp... yes
checking for memrchr... (cached) no
checking for wcwidth... (cached) yes
checking for mbtowc... yes
checking for sleep... yes
checking for symlink... (cached) yes
checking for utime... yes
checking for strlcpy... yes
checking for random... yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBPSL... no
checking for library containing psl_builtin... no
configure: WARNING: *** libpsl was not found. Fallback to builtin cookie checking.
checking for ZLIB... yes
checking for GNUTLS... no
configure: error: Package requirements (gnutls) were not met:

No package 'gnutls' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GNUTLS_CFLAGS
and GNUTLS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

I found different guides on the web, but none solve my problem. I try to install different package with brew, for example

brew install gnutls

but nothing works. In fact if I do brew install gnutls, seems to be correct, but if i digit

make

the error is that:

    /Library/Developer/CommandLineTools/usr/bin/make  all-recursive
Making all in lib
/Library/Developer/CommandLineTools/usr/bin/make  all-recursive
make[4]: Nothing to be done for `all-am'.
Making all in src
/Library/Developer/CommandLineTools/usr/bin/make  all-am
  CC       ftp.o
ftp.c:1466:19: error: no member named 'rpl_unlink' in 'struct options'
          if (opt.unlink && file_exists_p (con->target))
              ~~~ ^
../lib/unistd.h:1851:19: note: expanded from macro 'unlink'
#   define unlink rpl_unlink
                  ^
error: error opening '.deps/ftp.Tpo': Permission denied
2 errors generated.
make[3]: *** [ftp.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Can anyone help me?

I want to install wget on my Mac because I have to download folders in this page http://www.tlc.dii.univpm.it/fb4fd/ and using curl I can't download them in recursive way.

Best Answer

Have you tried installing wget directly from homebrew since you have it installed?

brew update && brew upgrade
brew install wget