关于macbook:MacBook安装wget几种方式

4次阅读

共计 1018 个字符,预计需要花费 3 分钟才能阅读完成。

形式一 (没有装置胜利)

官网下载 wget 源码包: wget-1.19.4.tar.gz

# 解压 
tar -zxvf wget-1.19.4.tar.gz

cd wget-1.19.4

./configure #运行配置文件报错,短少 pkg-config 或太老

#先装置 Xcode,它外面很多插件的
pkg-config —version #查看版本

#先装置 pkg-config

终端输出 pig-config —version 看有没有装置

官网下载 pkg-config-0.29.2.tar.gz 最新的包

解压 tar -zxvf pkg-config-0.29.2.tar.gz

cd pkg-config-0.29.2

./configure --with-internal-glib  运行配置文件进行系统配置

make  编译

make check  安装包自检测

sudo make install 装置

pkg-config —version 查看

#从新进入 wget 运行配置文件
cd wget-1.19.4

./configure —with-ssl=openssl 还是报错,他人评论说要先装置 Xcode 能力编译过,但我没有胜利 

下面的形式没有装置胜利,抉择上面形式装置胜利

形式二 (brew 装置胜利)

官网地址: https://brew.sh/index_zh-cn.html

# 装置 home-brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

#wget 装置
brew install wget

#查看版本
wget -V 
#显示如下:
GNU Wget 1.21.1 在 darwin20.2.0 上编译。-cares +digest -gpgme +https +ipv6 +iri +large-file -metalink +nls 
+ntlm +opie -psl +ssl/openssl 

#卸载 homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

#装置 homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
正文完
 0