Mac os command line: wget: command not found

使用wget 命令提示
sudo: wget: command not found
说明系统未安装过wget

  • 使用brew install wget

Homebrew简称brew,Homebrew是一款Mac OS平台下的软件包管理工具,很方便帮助我们实现安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,Homebrew官网中清楚介绍了安装和基本使用

  • 安装brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • 卸载brew(卸载与安装方法都是相同,把install改为uninstall,复制粘贴)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
  • brew 版本
➜  /Users/liuzhiwei> brew -v
Homebrew 2.2.7
Homebrew/homebrew-core (git revision 33cacc; last commit 2020-03-03)
  • brew 命令
Homebrew常用命令
 
brew -v	查询Homebrew版本
brew -h	brew帮助
brew update	更新Homebrew
brew install <pkg_name>	安装任意软件
brew uninstall <pkg_name>	卸载任意软件
brew search <pkg_name>	查询任意包
brew list	列出安装列表
brew info <pkg_name>	查看任意包内容信息
brew upgrade <pkg_name>	更新任意包
brew cleanup <pkg_name>	删除具体旧软件
brew cleanup		删除所有旧软件
brew outdated		已安装的包是否需要更新
brew deps	已安装的包是否需要更新

参考博客链接
brew 更改源地址

  • 卸载brew相关软件包
➜  /Users/liuzhiwei> brew uninstall wget
Uninstalling /usr/local/Cellar/wget/1.20.3_1... (49 files, 4.0MB)
➜  /Users/liuzhiwei> brew list wget
Error: No such keg: /usr/local/Cellar/wget
➜  /Users/liuzhiwei> brew list
➜  /Users/liuzhiwei> brew install wget
Error: Another active Homebrew update process is already in progress.
Please wait for it to finish or terminate it to continue.
==> Installing dependencies for wget: libidn2 and openssl@1.1
==> Installing wget dependency: libidn2
==> Downloading https://homebrew.bintray.com/bottles/libidn2-2.3.0.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/09/0908585cca518a83f101b2edc0417a26a4b4fc8b76e393c6f6672de6e595c914?__gda__=exp=1583228361~hmac
######################################################################## 100.0%
==> Pouring libidn2-2.3.0.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/libidn2/2.3.0: 70 files, 727.8KB
==> Installing wget dependency: openssl@1.1
==> Downloading https://homebrew.bintray.com/bottles/openssl@1.1-1.1.1d.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/d7/d7f992ebfd78f80828051f6dc6a1a99aed405f86b0f39ea651fd0afeadd1b0f4?__gda__=exp=1583228367~hmac
######################################################################## 100.0%
==> Pouring openssl@1.1-1.1.1d.catalina.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
  /usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because openssl/libressl is provided by macOS so don't link an incompatible version.

If you need to have openssl@1.1 first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

For pkg-config to find openssl@1.1 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"

==> Summary
🍺  /usr/local/Cellar/openssl@1.1/1.1.1d: 7,983 files, 17.9MB
==> Installing wget
==> Downloading https://homebrew.bintray.com/bottles/wget-1.20.3_2.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/ef/ef65c759c5097a36323fa9c77756468649e8d1980a3a4e05695c05e39568967c?__gda__=exp=1583228419~hmac
######################################################################## 100.0%
==> Pouring wget-1.20.3_2.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/wget/1.20.3_2: 50 files, 4.0MB
==> `brew cleanup` has not been run in 30 days, running now...
Removing: /Users/liuzhiwei/Library/Caches/Homebrew/autojump--22.5.3.catalina.bottle.tar.gz... (45.4KB)
Removing: /usr/local/Cellar/libidn2/2.2.0_1... (70 files, 700.9KB)
Removing: /Users/liuzhiwei/Library/Caches/Homebrew/descriptions.json... (263.3KB)
Pruned 0 symbolic links and 2 directories from /usr/local
==> Caveats
==> openssl@1.1
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/openssl@1.1/certs

and run
  /usr/local/opt/openssl@1.1/bin/c_rehash

openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,
because openssl/libressl is provided by macOS so don't link an incompatible version.

If you need to have openssl@1.1 first in your PATH run:
  echo 'export PATH="/usr/local/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

For compilers to find openssl@1.1 you may need to set:
  export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
  export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include"

For pkg-config to find openssl@1.1 you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig"
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值