Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
41.04k stars 9.63k forks source link

Brew upgrade only download, but do not upgrade #4388

Closed faxotherapy closed 6 years ago

faxotherapy commented 6 years ago

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

To help us debug your issue please explain:


Homebrew is suddenly no longer able to upgrade packages after it downloads them.

Below is exactly the procedure I followed (brew commands plus outputs):

β˜…  brew update
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
Updated Homebrew from 25542d7 to 0d33aba.
Updated 2 taps (homebrew/cask, homebrew/core).
==> New Formulae
beagle               eless                erlang@20            node_exporter        phpmyadmin
==> Updated Formulae
brew-cask-completion βœ”    eccodes                   libfreehand               prometheus
dcraw βœ”                   ejabberd                  libheif                   protobuf
gdbm βœ”                    elixir                    libical                   protobuf-c
harfbuzz βœ”                eprover                   liblcf                    protobuf-swift
icu4c βœ”                   erlang                    libmspub                  pulseaudio
imagemagick βœ”             faas-cli                  libosinfo                 pyenv
libyaml βœ”                 fdclone                   libphonenumber            qpdf
lynis βœ”                   fdroidserver              libuv                     qt
node βœ”                    feh                       libvisio                  quicktype
parallel βœ”                fftw                      libwebsockets             rabbitmq
perl βœ”                    firebase-cli              llvm@5                    rebar@3
streamlink βœ”              flow                      lmod                      rom-tools
unbound βœ”                 flyway                    logtalk                   rtv
unrar βœ”                   fn                        lxc                       rust
vim βœ”                     folly                     mafft                     sagittarius-scheme
youtube-dl βœ”              fonttools                 mame                      sbcl
abcm2ps                   fop                       mapnik                    sdb
abcmidi                   freeciv                   mariadb@10.2              shadowsocks-libev
ack                       freeling                  maven                     shared-mime-info
algernon                  frugal                    maxwell                   sile
alluxio                   fuseki                    mbedtls                   simgrid
amber                     gdal                      mimic                     skaffold
ant                       gdcm                      mint                      skafos
ant@1.9                   get-flash-videos          monetdb                   snakemake
apache-zeppelin           gibo                      mongo-c-driver            solr
app-engine-java           git                       mono                      sourcekitten
arangodb                  git-annex                 mosh                      sratoolkit
armadillo                 gitlab-runner             mpd                       stunnel
arpack                    gjstest                   nagios                    subversion
artifactory               gnome-builder             natalie                   supersonic
augustus                  gnu-units                 nats-streaming-server     swiftformat
aws-elasticbeanstalk      gopass                    neko                      swiftlint
aws-sdk-cpp               goreleaser                neomutt                   tarantool
azure-cli                 gradle                    nestopia-ue               tbb
bareos-client             grafana                   newsboat                  tectonic
bazel                     graph-tool                nifi                      teleport
beast                     graphicsmagick            nifi-registry             tesseract
bench                     grib-api                  node-build                tippecanoe
bit                       grpc                      node@8                    tkdiff
bitrise                   grv                       nss                       tmux-xpanes
bluepill                  gutenberg                 ocrmypdf                  tomcat
brotli                    gwyddion                  ompl                      unp64
caffe                     hadolint                  openapi-generator         upscaledb
cake                      haproxy                   openh264                  vagrant-completion
cfr-decompiler            heroku                    openrct2                  vala
cgrep                     hfstospell                ortp                      vault
chakra                    hive                      osm-pbf                   vim@7.4
cimg                      hugo                      paket                     webpack
citus                     i2p                       parallelstl               widelands
codec2                    imagemagick@6             passenger                 wildfly-as
cointop                   influxdb                  pazpar2                   wireguard-tools
commandbox                iperf3                    pdftoedn                  wolfssl
conan                     itex2mml                  pdftoipe                  wrangler
consul                    jenkins                   pegtl                     wtf
container-diff            jetty                     percona-xtrabackup        xtensor
convox                    jetty-runner              phoronix-test-suite       yaws
couchdb                   jhipster                  php                       yaz
cromwell                  joplin                    php@5.6                   yle-dl
crystal-lang              json-fortran              php@7.0                   you-get
darcs                     just                      php@7.1                   yq
dcm2niix                  keepassc                  phpunit                   zabbix
dfix                      kompose                   pianobar                  zanata-client
dfmt                      kubeless                  pipenv                    zbackup
dhall-json                kubernetes-cli            planck                    zebra
dialog                    landscaper                plantuml                  znapzend
diff-pdf                  languagetool              pmd                       zorba
diffoscope                ldc                       poppler
dislocker                 libcdr                    presto
dwdiff                    libcouchbase              progress
==> Renamed Formulae
cdiff -> ydiff
β˜…  brew outdated
brew-cask-completion (2.1) < 2.1_1
dcraw (9.27.0_2) < 9.28.0
exiftool (11.00) < 11.01
ffmpeg (4.0) < 4.0.1
gdbm (1.14.1_1) < 1.16
gnu-sed (4.2.2) < 4.5 [pinned at 4.2.2]
grep (2.27, 2.28) < 3.1 [pinned at 2.28]
harfbuzz (1.8.0) < 1.8.1_1
icu4c (61.1) < 62.1
imagemagick (7.0.7-38, 7.0.7-39) < 7.0.8-3
libgcrypt (1.8.2) < 1.8.3
libyaml (0.1.7) < 0.2.1
lynis (2.6.4) < 2.6.5
node (10.4.0) < 10.5.0_1
openssl (1.0.2o_1) < 1.0.2o_2
parallel (20180522) < 20180622
perl (5.26.2) < 5.28.0
python (3.6.5) < 3.6.5_1
python@2 (2.7.15) < 2.7.15_1
rclone (1.41) < 1.42
streamlink (0.13.0) < 0.14.0
unbound (1.7.1) < 1.7.3
unrar (5.6.4) < 5.6.5
vim (8.1.0001) < 8.1.0100_1
youtube-dl (2018.06.04) < 2018.06.25
β˜…  brew upgrade
Error: Not upgrading 2 pinned packages:
gnu-sed 4.5, grep 3.1
==> Upgrading 20 outdated packages, with result:
brew-cask-completion 2.1 -> 2.1_1, dcraw 9.27.0_2 -> 9.28.0, ffmpeg 4.0 -> 4.0.1, gdbm 1.14.1_1 -> 1.16, harfbuzz 1.8.0 -> 1.8.1_1, imagemagick 7.0.7-39 -> 7.0.8-3, libgcrypt 1.8.2 -> 1.8.3, libyaml 0.1.7 -> 0.2.1, lynis 2.6.4 -> 2.6.5, node 10.4.0 -> 10.5.0_1, parallel 20180522 -> 20180622, perl 5.26.2 -> 5.28.0, python 3.6.5 -> 3.6.5_1, python@2 2.7.15 -> 2.7.15_1, rclone 1.41 -> 1.42, streamlink 0.13.0 -> 0.14.0, unbound 1.7.1 -> 1.7.3, unrar 5.6.4 -> 5.6.5, vim 8.1.0001 -> 8.1.0100_1, youtube-dl 2018.06.04 -> 2018.06.25
==> Upgrading youtube-dl 
==> Downloading https://github.com/rg3/youtube-dl/releases/download/2018.06.25/youtube-dl-2018.06.25.ta
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/1039520/612b7748-7
######################################################################## 100.0%
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
🍺  /usr/local/Cellar/youtube-dl/2018.06.25: 12 files, 2.0MB, built in 5 seconds
==> Upgrading dcraw 
==> Downloading https://homebrew.bintray.com/bottles/dcraw-9.28.0.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring dcraw-9.28.0.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/dcraw/9.28.0: 4 files, 355.6KB
==> Upgrading ffmpeg --with-fdk-aac --with-x265 --with-libvorbis --with-two-lame

Then, suddenly stops working. This is all I have after running the command brew upgrade

I then type again:

β˜…  brew outdated
brew-cask-completion (2.1) < 2.1_1
ffmpeg (4.0) < 4.0.1
gdbm (1.14.1_1) < 1.16
gnu-sed (4.2.2) < 4.5 [pinned at 4.2.2]
grep (2.27, 2.28) < 3.1 [pinned at 2.28]
harfbuzz (1.8.0) < 1.8.1_1
imagemagick (7.0.7-38, 7.0.7-39) < 7.0.8-3
libgcrypt (1.8.2) < 1.8.3
libyaml (0.1.7) < 0.2.1
lynis (2.6.4) < 2.6.5
node (10.4.0) < 10.5.0_1
parallel (20180522) < 20180622
perl (5.26.2) < 5.28.0
python (3.6.5) < 3.6.5_1
python@2 (2.7.15) < 2.7.15_1
rclone (1.41) < 1.42
streamlink (0.13.0) < 0.14.0
unbound (1.7.1) < 1.7.3
unrar (5.6.4) < 5.6.5
vim (8.1.0001) < 8.1.0100_1

Packages still remain outdated.


β˜…  brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
  /usr/local/lib/libaspell.15.1.4.dylib
  /usr/local/lib/libpcre.0.dylib
  /usr/local/lib/libpspell.15.1.4.dylib

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/aspell.h
  /usr/local/include/pspell/pspell.h

Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .la files:
  /usr/local/lib/libaspell.la
  /usr/local/lib/libpcre.la
  /usr/local/lib/libpcrecpp.la
  /usr/local/lib/libpcreposix.la
  /usr/local/lib/libpspell.la

Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  pdftohtml

Using brew doctor does not help since I always had the above output when brew upgrade did upgrade packages after their download.

β˜…  brew config
HOMEBREW_VERSION: 1.6.9-33-g0d33aba
ORIGIN: https://github.com/Homebrew/brew
HEAD: 0d33aba0b7d8448e815a2eecc92417b46cb905f3
Last commit: 3 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 617ce4c81af575a5bb14ea67a19421ca5abc6f96
Core tap last commit: 17 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: --appdir=~/Applications/
HOMEBREW_DEV_CMD_RUN: 1
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_LINKAGE_CACHE: 1
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/bin/ruby
Clang: 8.0 build 800
Git: 2.10.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.43.0 => /usr/bin/curl
Java: 1.6.0_65-b14-468
macOS: 10.11.6-x86_64
CLT: 8.2.0.0.1.1480973914
Xcode: N/A
XQuartz: 2.7.11 => /opt/X11
faxotherapy commented 6 years ago

I just got the idea to run brew cleanup:

β˜…  brew cleanup
Warning: Skipping brew-cask-completion: most recent version 2.1_1 not installed
Warning: Skipping ffmpeg: most recent version 4.0.1 not installed
Warning: Skipping harfbuzz: most recent version 1.8.1_1 not installed
Warning: Skipping imagemagick: most recent version 7.0.8-3 not installed
Warning: Skipping libgcrypt: most recent version 1.8.3 not installed
Warning: Skipping lynis: most recent version 2.6.5 not installed
Warning: Skipping node: most recent version 10.5.0_1 not installed
Warning: Skipping parallel: most recent version 20180622 not installed
Warning: Skipping python@2: most recent version 2.7.15_1 not installed
Warning: Skipping rclone: most recent version 1.42 not installed
Warning: Skipping streamlink: most recent version 0.14.0 not installed
Warning: Skipping unbound: most recent version 1.7.3 not installed

I don't understand the warnings. For example, for rclone package:

β˜…  brew info rclone
rclone: stable 1.42 (bottled), HEAD
Rsync for cloud storage
https://rclone.org/
/usr/local/Cellar/rclone/1.41 (9 files, 38MB) *
  Poured from bottle on 2018-05-16 at 13:34:51
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/rclone.rb
==> Dependencies
Build: go βœ”
==> Options
--HEAD
    Install HEAD version
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completions have been installed to:
  /usr/local/share/zsh/site-functions

I don't understand why it would refuse to upgrade rclone

faxotherapy commented 6 years ago

Below, my fix to force package upgrade…

If the message Warning: Skipping appears after running brew cleanup, then brew upgrade one package at at time. For example:

β˜…  brew cleanup
Warning: Skipping harfbuzz: most recent version 1.8.1_1 not installed
Warning: Skipping lynis: most recent version 2.6.5 not installed

β˜…  brew upgrade lynis harfbuzz
==> Upgrading 2 outdated packages, with result:
lynis 2.6.4 -> 2.6.5, harfbuzz 1.8.0 -> 1.8.1_1
==> Upgrading lynis 
==> Downloading https://cisofy.com/files/lynis-2.6.5.tar.gz
==> Downloading from https://downloads.cisofy.com/lynis/lynis-2.6.5.tar.gz
######################################################################## 100.0%
🍺  /usr/local/Cellar/lynis/2.6.5: 97 files, 1.3MB, built in 2 seconds
==> Upgrading harfbuzz 
==> Downloading https://homebrew.bintray.com/bottles/harfbuzz-1.8.1_1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring harfbuzz-1.8.1_1.el_capitan.bottle.tar.gz
🍺  /usr/local/Cellar/harfbuzz/1.8.1_1: 151 files, 6.1MB
kennethkalmer commented 6 years ago

I'm seeing the same thing, its like homebrew doesn't loop over the packages correctly.

You can just keep running brew upgrade and it will upgrade a single package and upon processing the next candidate it just dies with exit code 1, after printing the name of the next package.

β€· $ brew update && brew upgrade
Already up-to-date.
Error: Not upgrading 2 pinned packages:
postgresql 10.4, postgis 2.4.4_1
==> Upgrading 19 outdated packages, with result:
planck 2.14.0 -> 2.16.0, heroku/brew/heroku 7.0.88 -> 7.5.5, cmake 3.11.3 -> 3.11.4, gdal 2.3.0 -> 2.3.1, python 3.6.5 -> 3.6.5_1, redis 4.0.9 -> 4.0.10, libyaml 0.1.7 -> 0.2.1, maven 3.5.3 -> 3.5.4, shared-mime-info 1.9 -> 1.10, harfbuzz 1.8.0 -> 1.8.1_1, erlang 20.3.7 -> 21.0.1, awscli 1.15.30 -> 1.15.40, ruby-build 20180601 -> 20180618, numpy 1.14.4 -> 1.14.5, libgcrypt 1.8.2 -> 1.8.3, railwaycat/emacsmacport/emacs-mac emacs-26.1-z-mac-7.0 -> emacs-26.1-z-mac-7.1, getsentry/tools/sentry-cli 1.32.2 -> 1.33.0, mysql 5.7.22 -> 8.0.11, heroku/brew/heroku-node 10.4.0 -> 10.5.0
==> Upgrading heroku/brew/heroku-node
β€· $

Oh snap, in this output it didn't even perform the upgrade, it just died with exit code 1. I've lost my earlier terminal output with better examples.

MikeMcQuaid commented 6 years ago

If you see this error (brew upgrade just stops and doesn't produce any output) and can reproduce: can you run brew upgrade --debug and paste your output here? @faxotherapy @kennethkalmer it'd be great if you could both do this, thanks! ❀️

Forcer78 commented 6 years ago

I've been seeing this for the past few days. brew upgrade --debug below, with initial (Formulary::TapLoader) lines removed:

Error: Not upgrading 1 pinned package:
html-xml-utils 7.7
==> Upgrading 3 outdated packages, with result:
perl 5.26.2 -> 5.28.0, python 3.6.5_1 -> 3.7.0, vim 8.1.0100 -> 8.1.0100_2
==> Upgrading perl 
/Users/user/homebrew/Library/Homebrew/install.rb:35:in `exit'
/Users/user/homebrew/Library/Homebrew/install.rb:35:in `check_development_tools'
/Users/user/homebrew/Library/Homebrew/formula_installer.rb:224:in `install'
/Users/user/homebrew/Library/Homebrew/cmd/upgrade.rb:149:in `upgrade_formula'
/Users/user/homebrew/Library/Homebrew/cmd/upgrade.rb:96:in `block in upgrade'
/Users/user/homebrew/Library/Homebrew/cmd/upgrade.rb:93:in `each'
/Users/user/homebrew/Library/Homebrew/cmd/upgrade.rb:93:in `upgrade'
/Users/user/homebrew/Library/Homebrew/brew.rb:100:in `<main>'
$ brew --version
Homebrew 1.6.9-51-g61a8c4d
Homebrew/homebrew-core (git revision b314a; last commit 2018-07-01)
kennethkalmer commented 6 years ago

Here is mine:

$ brew upgrade
Updated Homebrew from 0d33aba0b to 1e610ae7a.
...
$ brew upgrade --debug
...
==> Upgrading 9 outdated packages, with result:
planck 2.14.0 -> 2.16.0, coreutils 8.29 -> 8.30, heroku/brew/heroku 7.5.5 -> 7.5.7, gdal 2.3.1 -> 2.3.1_1, python 3.6.5_1 -> 3.7.0, awscli 1.15.40 -> 1.15.40_1, numpy 1.14.5 -> 1.14.5_1, railwaycat/emacsmacport/emacs-mac emacs-26.1-z-mac-7.0 -> emacs-26.1-z-mac-7.1, getsentry/tools/sentry-cli 1.32.2 -> 1.33.0
==> Upgrading getsentry/tools/sentry-cli
/usr/local/Homebrew/Library/Homebrew/install.rb:35:in `exit'
/usr/local/Homebrew/Library/Homebrew/install.rb:35:in `check_development_tools'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:224:in `install'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:149:in `upgrade_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:96:in `block in upgrade'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:93:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:93:in `upgrade'
/usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `<main>'