daleksprinter / dotfiles

My Dotfiles
0 stars 0 forks source link

phpenvが機能してない #7

Closed daleksprinter closed 1 year ago

daleksprinter commented 1 year ago
➜  plugins git:(master) phpenv install 8.1.8
[Info]: Loaded extension plugin
[Info]: Loaded apc Plugin.
[Info]: Loaded composer Plugin.
[Info]: Loaded github Plugin.
[Info]: Loaded uprofiler Plugin.
[Info]: Loaded xdebug Plugin.
[Info]: Loaded xhprof Plugin.
[Info]: Loaded zendopcache Plugin.
[Info]: php.ini-production gets used as php.ini
[Info]: Building 8.1.8 into /Users/r-sekine/.phpenv/versions/8.1.8
[Downloading]: https://www.php.net/distributions/php-8.1.8.tar.bz2
[Preparing]: /var/tmp/php-build/source/8.1.8

-----------------
|  BUILD ERROR  |
-----------------

Here are the last 10 lines from the log:

-----------------------------------------
grep: invalid option -- P
usage: grep [-abcdDEFGHhIiJLlMmnOopqRSsUVvwXxZz] [-A num] [-B num] [-C[num]]
        [-e pattern] [-f file] [--binary-files=value] [--color=when]
        [--context[=num]] [--directories=action] [--label] [--line-buffered]
        [--null] [pattern] [file ...]
configure: WARNING: unrecognized options: --with-png-dir, --with-libxml-dir, --with-icu-dir
configure: error: Please reinstall the BZip2 distribution
-----------------------------------------

The full Log is available at '/tmp/php-build.8.1.8.20230422222346.log'.
[Warn]: Aborting build.
➜  plugins git:(master) php
fish: Unknown command: php
➜  plugins git:(master) phpenv versions
  7.2.34
* 7.3.33 (set by /Users/r-sekine/.phpenv/version)
  8.1.8
➜  plugins git:(master) phpenv global 7.2.34
7.2.34
/Users/r-sekine/.phpenv/libexec/phpenv-global: line 47: php-config: command not found

もうなんか色々動いてない

daleksprinter commented 1 year ago
➜  .phpenv git:(master) pwd
/Users/r-sekine/.phpenv
➜  .phpenv git:(master) ls
LICENSE      README.md    bin/         completions/ lib/         libexec/     plugins/     shims/       version      versions/

https://github.com/daleksprinter/dotfiles/blob/7c846c4809270b455c8c5c15ff3f5af198d5be19/.config/fish/mycnf/language.fish#L19-L20

phpenvの設定はできてそうだけど、phpのbuildがうまくいってないっぽさがある

daleksprinter commented 1 year ago

https://memo.xight.org/2014-03-31-4 .phpenv/bin/phpenv-install-all-darwin これをやってなかったってことか

daleksprinter commented 1 year ago
./phpenv-install-all-darwin
Installing PHP build dependencies...
ERROR: Something already installed is a good thing

grep: /usr/local/Library/Formula/flex.rb: No such file or directory
patch: **** Can't open patch file /Users/r-sekine/.phpenv/patches/homebrew-flex.diff : No such file or directory
==> Downloading https://formulae.brew.sh/api/formula.jws.json
######################################################################## 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
######################################################################## 100.0%
Warning: No available formula with the name "tidy". Did you mean tidyp?
==> Searching for similarly named formulae and casks...
==> Formulae
perltidy                           tidy-html5 ✔                       tidy-viewer                        tidyp

To install perltidy, run:
  brew install perltidy

==> Casks
tiddly

To install tiddly, run:
  brew install --cask tiddly
fatal: not a git repository (or any of the parent directories): .git
libxml2  is already installed but outdated (so it will be upgraded).
==> Fetching libxml2
==> Downloading https://ghcr.io/v2/homebrew/core/libxml2/manifests/2.10.4
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/libxml2/blobs/sha256:c96215e78e29ff4cf9cfed1d29af5d33fb968aadd7599b7fecb4cc703acec759
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:c96215e78e29ff4cf9cfed1d29af5d33fb968aadd7599b7fecb4c
######################################################################## 100.0%
==> Pouring libxml2--2.10.4.monterey.bottle.tar.gz
==> Caveats
libxml2 is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have libxml2 first in your PATH, run:
  fish_add_path /usr/local/opt/libxml2/bin

For compilers to find libxml2 you may need to set:
  set -gx LDFLAGS "-L/usr/local/opt/libxml2/lib"
  set -gx CPPFLAGS "-I/usr/local/opt/libxml2/include"

For pkg-config to find libxml2 you may need to set:
  set -gx PKG_CONFIG_PATH "/usr/local/opt/libxml2/lib/pkgconfig"
==> Summary
🍺  /usr/local/Cellar/libxml2/2.10.4: 206 files, 7MB
==> Running `brew cleanup libxml2`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /usr/local/Cellar/libxml2/2.10.3_2... (206 files, 7.0MB)
Removing: /Users/r-sekine/Library/Caches/Homebrew/libxml2--2.10.3_2... (1.5MB)
fatal: not a git repository (or any of the parent directories): .git
Error: Unknown command: versions
Error: Unknown command: switch
grep: /usr/local/opt/httpd/etc/apache2/httpd.conf: No such file or directory
/Users/r-sekine/.phpenv/bin/phpenv-install-all-darwin: line 44: /usr/local/opt/httpd/etc/apache2/httpd.tmp: No such file or directory

Fetching the latest releases to see what is available...
If this is the first time you use phpenv we have to clone
the php-src repo first, please be patient...
These are the latest releases, we will install them now:

Cleaning the build environment...
Running: phpenv install
install:
========
   Install a PHP version using the php-build plugin

Usage: phpenv install [--ini|-i <environment>] [-v|--verbose] [-f|-s] <version>
       phpenv install [--ini|-i <environment>] [-v|--verbose] [-f|-s] <definition-file>
       phpenv install -l|--list
       phpenv install -V|--version

 -l/--list          List all available versions
 -f/--force         Install even if the version appears to be installed already
 -s/--skip-existing Skip if the version appears to be installed already

 php-build options:

 -k/--keep          Do not run make clean on source tree / keep object files
 -v/--verbose       Verbose mode: print compilation status to stdout
 -V/--version       Show version of php-build

For detailed information on installing PHP versions with
php-build, including a list of environment variables for adjusting
compilation, see: https://github.com/php-build/php-build
Ok that didn't work, please open an issue for this.

fatal: not a git repository (or any of the parent directories): .git Error: Unknown command: versions Error: Unknown command: switch grep: /usr/local/opt/httpd/etc/apache2/httpd.conf: No such file or directory /Users/r-sekine/.phpenv/bin/phpenv-install-all-darwin: line 44: /usr/local/opt/httpd/etc/apache2/httpd.tmp: No such file or directory

daleksprinter commented 1 year ago

なにapacheに依存してるの

daleksprinter commented 1 year ago

https://github.com/phpenv/phpenv/tree/master 更新止まってるんだよな 最近のbrewと相性悪そうに見える phpenv止めるか