ubuntu 下 brew 无法成功安装 php


本人环境配置

Ubuntu 17.04
Homebrew 1.2.1

问题描述

Ubuntu中使用linuxbrew安装php (brew install php54)提示错误.

$ brew install php54
Error: No available formula with the name "php54"
==> Searching for a previously deleted formula...
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.

$ brew install homebrew/php/php53                                         1 ↵
==> Tapping homebrew/php
    ...
Error: Invalid formula: /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-apache/mod_suexec.rb
formulae require at least a URL
Error: Cannot tap homebrew/apache: invalid syntax in tap!

使用brew doctor 查看brew状态,有一个warning, 猜测可能是python版本有关.

$ 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 and just ignore them. Thanks!

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/python3.5/greenlet/greenlet.h
  /usr/local/include/python2.7/greenlet/greenlet.h
Warning: Calling Utils::Shell.shell_profile is deprecated!
Use Utils::Shell.profile instead.
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/diagnostic.rb:517:in \`check_xdg_data_dirs\'


Warning: Homebrew\'s share was not found in your XDG_DATA_DIRS but you have
this variable set to include other locations.
Some programs like \`vapigen\` may not work correctly.
Consider setting the XDG_DATA_DIRS for example like so
    echo 'export XDG_DATA_DIRS="/home/linuxbrew/.linuxbrew/share:$XDG_DATA_DIRS"' >> ~/.bash_profile

解决方法

暂时没找到


参考文档


Author: Itaken
Reprint policy: All articles in this blog are used except for special statements CC BY 4.0 reprint polocy. If reproduced, please indicate source Itaken !
  TOC目录