sqitchers / homebrew-sqitch

Homebrew Formulas for Sqitch
22 stars 10 forks source link

Configure failed for DBD-mysql-4.050 & Github authetication Error ? #44

Closed wyldone closed 5 years ago

wyldone commented 5 years ago

Tried to install sqitch, but it is unable to configure DBD-mysql-4.050. Additionally I am getting an authentication failure from github.

`brew install sqitch --with-mysql-support --without-mysql                                    
==> Installing sqitch from sqitchers/sqitch
==> Downloading https://www.cpan.org/authors/id/D/DW/DWHEELER/App-Sqitch-v1.0.0.tar.gz
Already downloaded: /Users/rach3tralph/Library/Caches/Homebrew/downloads/af70b18a20c3e267a28e3f0cea0d95b9ccda706baa5eee5d6507b0953892fde2--App-Sqitch-v1.0.0.tar.gz
==> cpanm --local-lib instutil --quiet --notest Menlo::CLI::Compat Module::Build
==> perl Build.PL --quiet --install_base /usr/local/Cellar/sqitch/v1.0.0 --etcdir /usr/local/etc/sqitch --with mysql
==> ./Build bundle
Last 15 lines from /Users/rach3tralph/Library/Logs/Homebrew/sqitch/03.Build:
Successfully installed MooX-Types-MooseLike-0.29
Successfully installed Config-GitLike-1.17
Successfully installed IPC-Run3-0.048
Successfully installed String-ShellQuote-1.04
Successfully installed DateTime-Locale-1.24
Successfully installed DateTime-1.51
Successfully installed Encode-Locale-1.05
Successfully installed Devel-CheckLib-1.13
! Configure failed for DBD-mysql-4.050. See /private/tmp/sqitch-20190701-83391-1kn2obz/App-Sqitch-v1.0.0/.brew_home/.cpanm/work/1562026557.87905/build.log for details.
Successfully installed AppConfig-1.71
Successfully installed Template-Toolkit-2.29
! Installing the dependencies failed: Module 'DBD::mysql' is not installed
! Bailing out the installation for App-Sqitch-v1.0.0.
Error installing modules:
88 distributions installed

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/sqitchers/homebrew-sqitch/issues

/usr/local/Homebrew/Library/Homebrew/utils/github.rb:253:in `raise_api_error': GitHub Bad credentials:HOMEBREW_GITHUB_API_TOKEN may be invalid or expired; check: (GitHub::AuthenticationFailedError)
  https://github.com/settings/tokens
    from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:212:in `open_api'
    from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:357:in `search'
    from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:265:in `search_issues'
    from /usr/local/Homebrew/Library/Homebrew/utils/github.rb:278:in `issues_for_formula'
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:374:in `fetch_issues'
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:370:in `issues'
    from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:424:in `dump'
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:141:in `rescue in <main>'
    from /usr/local/Homebrew/Library/Homebrew/brew.rb:38:in `<main>'
`

image

theory commented 5 years ago

Do you have MySQL installed somewhere where the DBD::mysql installer can find it? You might need to set some environment variables if you're relying on your own, non-homebrew install of MySQL. If you don't have MySQL installed, remove --without-mysql.

Not sure what the GitHub API token thing is about; must be a Homebrew issue.

theory commented 5 years ago

Did you get this working, @RachetRalph?

saqibameen commented 5 years ago

@theory I am having the same issue on MacOS Mojave. Below is the log from terminal.

brew install sqitch --with-mysql-support --without-mysql

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
No changes to formulae.

==> Installing sqitch from sqitchers/sqitch
==> Downloading https://www.cpan.org/authors/id/D/DW/DWHEELER/App-Sqitch-v1.0.0.
Already downloaded: /Users/saqibameen/Library/Caches/Homebrew/downloads/af70b18a20c3e267a28e3f0cea0d95b9ccda706baa5eee5d6507b0953892fde2--App-Sqitch-v1.0.0.tar.gz
==> cpanm --local-lib instutil --quiet --notest Menlo::CLI::Compat Module::Build
==> perl Build.PL --quiet --install_base /usr/local/Cellar/sqitch/v1.0.0 --etcdi
==> ./Build bundle
Last 15 lines from /Users/saqibameen/Library/Logs/Homebrew/sqitch/03.Build:
Successfully installed Clone-0.41
Successfully installed File-Which-1.23
Successfully installed IO-Pager-0.4
Successfully installed String-Formatter-0.102084
Successfully installed Template-Tiny-1.12
Successfully installed MooX-Types-MooseLike-0.29
Successfully installed Config-GitLike-1.17
Successfully installed Clone-Choose-0.010
Successfully installed Hash-Merge-0.300
Successfully installed AppConfig-1.71
Successfully installed Template-Toolkit-2.29
! Installing the dependencies failed: Module 'DBD::mysql' is not installed
! Bailing out the installation for App-Sqitch-v1.0.0.
Error installing modules:
88 distributions installed

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
  https://github.com/sqitchers/homebrew-sqitch/issues

I have installed mysql@5.7 using homebrew. Any pointers on how to solve it?

theory commented 5 years ago

Did you try setting the environment variables to tell DBD::mysql where to find mysql@5.7, @saqibameen? Or, better yet, is the MySQL bin directory in your Path? That's how DBD::mysql finds it.

saqibameen commented 5 years ago

@theory yes, I have following in my .zshrc file.

export PATH="/usr/local/opt/mysql@5.7/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/mysql@5.7/lib"
export CPPFLAGS="-I/usr/local/opt/mysql@5.7/include"

# DBD paths
export DBD_MYSQL_CFLAGS="-I/usr/local/opt/mysql@5.7/include"
export DBD_MYSQL_LIBS="-L/usr/local/opt/mysql@5.7/lib"
theory commented 5 years ago

So we need to find out why DBD::mysql fails to build. What happens if you try to install it manually?

cpanminus DBD::mysql
saqibameen commented 5 years ago

cpan installation of dbd failed for me. So, I installed manually, as mentioned the docs.

wyldone commented 5 years ago

@theory no I had to jump on some other tasks, at work I am going to try the suggested steps here and give you as much feedback as possible. Thank you for being so responsive. Appreciate the help. Let me get back to you on this.

wyldone commented 5 years ago

Do you have MySQL installed somewhere where the DBD::mysql installer can find it? You might need to set some environment variables if you're relying on your own, non-homebrew install of MySQL. If you don't have MySQL installed, remove --without-mysql.

Not sure what the GitHub API token thing is about; must be a Home brew issue.

I have a separate mySql, I chose not to use the homebrew version because I need a specific version of mysql server that is not supported by homebrew. I will look at my .zshrc and see what I have. Let me get back to you on this one.

Yes that was a personal token issue, not at all related.

wyldone commented 5 years ago

If anyone comes across this issue, make sure you get DBD::mysql installed properly. While installing include this in your local mysql grant all privileges on test.* to ‘usernameofyourmac’@‘localhost’ identified by ‘s3kr1t’; this will let DBD::mysql create a test user in order to successfully run all its required tests successfully. Once done make sure you set the environment variables in your .zhrc or .bashrc file. Then attempt to install sqitch. This is what worked for me.