Homebrew

命令

brew install pakage
brew search package
brew info package
brew uninstall package

问题

brew install webp

chopin@chopindeMacBook-Pro~$brew install webp
==> Downloading https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.6.1

curl: (7) Failed to connect to storage.googleapis.com port 443: Operation timed out
Error: Failed to download resource "webp"
Download failed: https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-0.6.1.tar.gz

原因是googleapis被墙了
解决方法:替换下载地址

chopin@chopindeMacBook-Pro~$ brew edit webp
Editing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/webp.rb
Warning: Using atom because no editor was set in the environment.
This may change in the future, so we recommend setting EDITOR,
or HOMEBREW_EDITOR to your preferred text editor.

修改url如下:

class Webp < Formula
  desc "Image format providing lossless and lossy compression for web images"
  homepage "https://developers.google.com/speed/webp/"
  url "http://downloads.webmproject.org/releases/webp/libwebp-0.6.1.tar.gz"
  sha256 "06503c782d9f151baa325591c3579c68ed700ffc62d4f5a32feead0ff017d8ab"

你可能感兴趣的:(Homebrew)