Homebrew / brew

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

getting error Error: 784: unexpected token at '' when I run brew upgrade, or doctor #4439

Closed ghost closed 6 years ago

ghost commented 6 years ago

@richhyde commented on Jul 7, 2018, 6:50 PM UTC:

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.

$ brew config
HOMEBREW_VERSION: 1.6.9
ORIGIN: https://github.com/Homebrew/brew
HEAD: c814199a791867ab75f90a22715e2475706b13d8
Last commit: 3 weeks ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: fab7dcd226e13d1df33a40439dd11c6a60715f52
Core tap last commit: 9 hours ago
HOMEBREW_PREFIX: /usr/local
CPU: 16-core 64-bit skylake
Homebrew Ruby: 2.3.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 9.1 build 902
Git: 2.15.2 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 10.0.1, 1.8.0_171
macOS: 10.13.5-x86_64
CLT: 9.4.1.0.1.1528165917
Xcode: N/A
brew doctor
Error: 784: unexpected token at ''
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
/usr/local/Homebrew/Library/Homebrew/tab.rb:61:in `from_file_content'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `block in from_file'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `fetch'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `from_file'
/usr/local/Homebrew/Library/Homebrew/tab.rb:101:in `for_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:311:in `from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:295:in `from_rack'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:791:in `block in check_for_unlinked_but_not_keg_only'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:788:in `reject'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:788:in `check_for_unlinked_but_not_keg_only'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:46:in `block in doctor'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:in `doctor'
/usr/local/Homebrew/Library/Homebrew/brew.rb:99:in `<main>'

To help us debug your issue please explain:

This issue was moved by ilovezfs from Homebrew/homebrew-core#29838.

MikeMcQuaid commented 6 years ago

@richhyde can you try brew doctor --debug --verbose, brew linkage brew deps --installed, and paste their output here?

richhyde commented 6 years ago

WIll do this evening when I am back on the system

richhyde commented 6 years ago
$ brew doctor --debug --verbose
Checking check_access_cache
Checking check_access_cellar
Checking check_access_homebrew_repository
Checking check_access_lock_dir
Checking check_access_logs
Checking check_access_prefix_directories
Checking check_access_site_packages
Checking check_brew_git_origin
Checking check_build_from_source
Checking check_clt_minimum_version
Checking check_clt_up_to_date
Checking check_coretap_git_origin
Checking check_filesystem_case_sensitive
Checking check_for_anaconda
Checking check_for_bad_curl
Checking check_for_bad_python_symlink
Checking check_for_beta_xquartz
Checking check_for_config_scripts
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: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.

Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
  /usr/local/CrossPack-AVR/bin/libusb-config
Checking check_for_external_cmd_name_conflict
Checking check_for_gettext
Checking check_for_git
Checking check_for_iconv
Checking check_for_installed_developer_tools
Checking check_for_multiple_volumes
Checking check_for_non_prefixed_coreutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/coreutils.rb
Checking check_for_non_prefixed_findutils
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/findutils.rb
Checking check_for_other_frameworks
Checking check_for_other_package_managers
Checking check_for_pydistutils_cfg_in_home
Checking check_for_stray_dylibs
Checking check_for_stray_headers
Checking check_for_stray_las
Checking check_for_stray_pcs
Checking check_for_stray_static_libs
Checking check_for_symlinked_cellar
Checking check_for_tap_ruby_files_locations
Checking check_for_unlinked_but_not_keg_only
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/icu4c.rb
/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::TapLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/libarchive.rb
Error: 784: unexpected token at ''
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
/usr/local/Homebrew/Library/Homebrew/tab.rb:61:in `from_file_content'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `block in from_file'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `fetch'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `from_file'
/usr/local/Homebrew/Library/Homebrew/tab.rb:101:in `for_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:311:in `from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:295:in `from_rack'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:791:in `block in check_for_unlinked_but_not_keg_only'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:788:in `reject'
/usr/local/Homebrew/Library/Homebrew/diagnostic.rb:788:in `check_for_unlinked_but_not_keg_only'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:46:in `block in doctor'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:in `doctor'
/usr/local/Homebrew/Library/Homebrew/brew.rb:99:in `<main>'

and
h$ brew linkage
Richs-iMac-2:esptool rich$ 

And
 brew deps --installed
Error: 784: unexpected token at ''
Please report this bug:
  https://docs.brew.sh/Troubleshooting
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
/usr/local/Homebrew/Library/Homebrew/tab.rb:61:in `from_file_content'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `block in from_file'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `fetch'
/usr/local/Homebrew/Library/Homebrew/tab.rb:56:in `from_file'
/usr/local/Homebrew/Library/Homebrew/tab.rb:101:in `for_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:311:in `from_keg'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:295:in `from_rack'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1407:in `block in installed'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1405:in `each'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1405:in `flat_map'
/usr/local/Homebrew/Library/Homebrew/formula.rb:1405:in `installed'
/usr/local/Homebrew/Library/Homebrew/cmd/deps.rb:95:in `deps'
/usr/local/Homebrew/Library/Homebrew/brew.rb:99:in `<main>'
ilovezfs commented 6 years ago

@richhyde thanks. Can you please brew update and try those commands again, and post output? Some new debugging code was just added for this in https://github.com/Homebrew/brew/pull/4446.

richhyde commented 6 years ago

I did two brew updates as requested output below: brew update Updated Homebrew from 61a8c4d1f to 0aab25bdb. Updated 2 taps (homebrew/core, homebrew/cask). ==> New Formulae python-yq ==> Updated Formulae py2cairo ✔ clingo dmd futhark imagemagick memcached opendetex sshguard u-boot-tools aircrack-ng convox dnscrypt-proxy go-statik imagemagick@6 meson py3cairo sshrc uwsgi annie coq dovecot gobuster jenkins mongodb@3.6 quicktype terragrunt wireguard-tools bats-core cython e2fsprogs goreleaser libgit2 mvtools rancher-cli the_platinum_searcher yaz bind darksky-weather faas-cli hadolint libqalculate ntl rust tor ykman cargo-completion diffoscope fn hugo libuv ocrmypdf s3fs tox youtube-dl clamav dlib folly hyperscan math-comp odpi shairport-sync txr yq ==> Deleted Formulae artifactory-cli-go wry Error: Cannot parse /usr/local/Cellar/pebble-toolchain/2.0/INSTALL_RECEIPT.json: 784: unexpected token at '' Please report this bug: https://docs.brew.sh/Troubleshooting /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in parse' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:inparse' /usr/local/Homebrew/Library/Homebrew/tab.rb:62:in from_file_content' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:inblock in from_file' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:in fetch' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:infrom_file' /usr/local/Homebrew/Library/Homebrew/tab.rb:105:in for_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:311:infrom_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:295:in from_rack' /usr/local/Homebrew/Library/Homebrew/formula.rb:1407:inblock in installed' /usr/local/Homebrew/Library/Homebrew/formula.rb:1405:in each' /usr/local/Homebrew/Library/Homebrew/formula.rb:1405:inflat_map' /usr/local/Homebrew/Library/Homebrew/formula.rb:1405:in installed' /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:506:inmigrate_formula_rename' /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:100:in each' /usr/local/Homebrew/Library/Homebrew/cmd/update-report.rb:100:inupdate_report' /usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `

' Richs-iMac-2:esptool rich$ brew update Already up-to-date. Richs-iMac-2:esptool rich$ 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: "config" scripts exist outside your system or Homebrew directories. ./configure scripts often look for *-config scripts to determine if software packages are installed, and what additional flags to use when compiling and linking.

Having additional scripts in your path can confuse software installed via Homebrew if the config script overrides a system or Homebrew provided script of the same name. We found the following "config" scripts: /usr/local/CrossPack-AVR/bin/libusb-config Error: Cannot parse /usr/local/Cellar/pebble-toolchain/2.0/INSTALL_RECEIPT.json: 784: unexpected token at '' Please report this bug: https://docs.brew.sh/Troubleshooting /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in parse' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:inparse' /usr/local/Homebrew/Library/Homebrew/tab.rb:62:in from_file_content' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:inblock in from_file' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:in fetch' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:infrom_file' /usr/local/Homebrew/Library/Homebrew/tab.rb:105:in for_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:311:infrom_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:295:in from_rack' /usr/local/Homebrew/Library/Homebrew/diagnostic.rb:791:inblock in check_for_unlinked_but_not_keg_only' /usr/local/Homebrew/Library/Homebrew/diagnostic.rb:788:in reject' /usr/local/Homebrew/Library/Homebrew/diagnostic.rb:788:incheck_for_unlinked_but_not_keg_only' /usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:46:in block in doctor' /usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:ineach' /usr/local/Homebrew/Library/Homebrew/cmd/doctor.rb:38:in doctor' /usr/local/Homebrew/Library/Homebrew/brew.rb:100:in

' Richs-iMac-2:esptool rich$ brew upgrade \Error: Cannot parse /usr/local/Cellar/pebble-toolchain/2.0/INSTALL_RECEIPT.json: 784: unexpected token at '' Please report this bug: https://docs.brew.sh/Troubleshooting /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in parse' /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:inparse' /usr/local/Homebrew/Library/Homebrew/tab.rb:62:in from_file_content' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:inblock in from_file' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:in fetch' /usr/local/Homebrew/Library/Homebrew/tab.rb:56:infrom_file' /usr/local/Homebrew/Library/Homebrew/tab.rb:105:in for_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:311:infrom_keg' /usr/local/Homebrew/Library/Homebrew/formulary.rb:295:in from_rack' /usr/local/Homebrew/Library/Homebrew/formula.rb:1407:inblock in installed' /usr/local/Homebrew/Library/Homebrew/formula.rb:1405:in each' /usr/local/Homebrew/Library/Homebrew/formula.rb:1405:inflat_map' /usr/local/Homebrew/Library/Homebrew/formula.rb:1405:in installed' /usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:36:inupgrade' /usr/local/Homebrew/Library/Homebrew/brew.rb:100:in `
' Richs-iMac-2:esptool rich$

MikeMcQuaid commented 6 years ago

@richhyde Run rm -rf /usr/local/Cellar/pebble-toolchain/2.0/INSTALL_RECEIPT.json; brew uninstall --force pebble-toolchain; rm -rf /usr/local/Cellar/pebble-toolchain; brew reinstall pebble-toolchain.

MikeMcQuaid commented 6 years ago

@richhyde Any luck?

richhyde commented 6 years ago

Something is still broken, but I got past this one by deleting a bunch of stuff. Is there a way to reset an install? I keep running into locks left around, I think apple screwed me when I migrated some stuff, or something got really confused. I am grasping for straws as to how it happened. At this point I just want to reset all that I can to be functional, otherwise it seems I am deleting too many internal files to get anything to build.

Rich

From: Mike McQuaid notifications@github.com Sent: Monday, July 23, 2018 12:31 PM To: Homebrew/brew brew@noreply.github.com Cc: Hyde, Richard Richard.Hyde@xerox.com; Mention mention@noreply.github.com Subject: Re: [Homebrew/brew] getting error Error: 784: unexpected token at '' when I run brew upgrade, or doctor (#4439)

@richhydehttps://github.com/richhyde Any luck?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Homebrew/brew/issues/4439#issuecomment-407174064, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AmagsMyXxhQpdav4ztkJF8mLRuh9KZYBks5uJiRtgaJpZM4VGnkD.

MikeMcQuaid commented 6 years ago

@richhyde You can use brew bundle dump to dump all your installed packages to a Brewfile, the uninstall from https://github.com/Homebrew/install to remove everything, the install from https://github.com/Homebrew/install to install Homebrew and brew bundle to reinstall your packages.