• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

shivammathur/homebrew-php: Homebrew tap for PHP 5.6 to 8.2. PHP 8.2 is a nightly ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

shivammathur/homebrew-php

开源软件地址:

https://github.com/shivammathur/homebrew-php

开源编程语言:

Ruby 100.0%

开源软件介绍:

Homebrew Tap for PHP

brew tap shivammathur/php

Build status LICENSE PHP Versions Supported

Linux architectures supported macOS architectures supported macOS architectures supported

PHP Support

PHP Version Formula
PHP 5.6 [email protected]
PHP 7.0 [email protected]
PHP 7.1 [email protected]
PHP 7.2 [email protected]
PHP 7.3 [email protected]
PHP 7.4 [email protected]
PHP 8.0 [email protected]
PHP 8.1 php or [email protected]
PHP 8.2.0-dev [email protected]

OS Support

Operating System Architecture
Linux 4.18+ x86_64
macOS Catalina x86_64
macOS Big Sur x86_64, arm64
macOS Monterey x86_64, arm64

On Linux, GLIBC 2.27 or newer is required, so distributions with Linux kernel 4.18 and newer are supported.
For example: Ubuntu 18.04, Debian 10, CentOS 8, Fedora 28, and newer versions of these distributions.

Usage

Prerequisites

  • On macOS, install Xcode Command Line Utilities:
xcode-select --install
  • On Linux, install cURL and Git:
# Using APT
sudo apt-get install -y curl git

# Using Yum
sudo yum install -y curl git
  • Install Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • If previously installed, update homebrew and the formulae:
brew update
  • If you have packages from old homebrew/php tap, refer to this guide for removing them.

Add this tap

Fetch the formulae in this tap:

brew tap shivammathur/php

Install PHP

See PHP Support for available formulae.

  • For example, to install PHP 8.0:
brew install shivammathur/php/[email protected]
  • After installing your have to link it:
brew link --overwrite --force shivammathur/php/[email protected]
  • Restart the terminal and test your PHP version:
php -v

Upgrade your PHP version

You can upgrade your PHP version to the latest patch release.

For example, to upgrade PHP 8.0:

brew upgrade shivammathur/php/[email protected]

Switch between PHP versions

  • If you have multiple PHP versions installed, you can switch between them easily.

For example, to switch to PHP 8.0:

brew link --overwrite --force shivammathur/php/[email protected]
  • If you get a warning like below, then do as recommended:
Warning: Already linked: <Cellar Path>
To relink:
  brew unlink <formula> && brew link <formula>
brew unlink [email protected]
brew link --overwrite --force shivammathur/php/[email protected]

Restart your webserver

If you are using Apache or Nginx with php-fpm, restart your webserver after any change in your PHP.

  • For Apache (httpd):
brew services restart httpd
  • For Nginx:
brew services restart nginx

Debugging

  • Make sure you ran brew update before installing PHP.

  • Run brew doctor and fix the warnings it reports.

  • Make sure homebrew has correct permissions.

sudo chown -R "$(id -un)":"$(id -gn)" $(brew --prefix)
  • If PHP is not working after a macOS update. Reinstall PHP along with its dependencies.

For example to reinstall PHP 8.0 and its dependencies:

brew reinstall $(brew deps shivammathur/php/[email protected]) shivammathur/php/[email protected]
  • Check if your issue is a Homebrew's common issue.

  • If you are still facing an issue, please create a discussion thread here.

License

The code in this project is licensed under the MIT license. Please see the license file for more information.

This project has some dependencies, and their license can be found here.

Contributions

Contributions are welcome! Please see Contributor's Guide before you start. If you face any issues while using this tap or want to suggest a feature/improvement, create an discussion thread here.

Sponsors

We use MacStadium for our CI infrastructure.

Mac Stadium Mac Stadium

This project is generously supported by many other users and organisations via GitHub Sponsors.

Sponsor shivammathur

Related Projects

Dependencies




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
WagicProject/wagic: Wagic the Homebrew发布时间:2022-06-14
下一篇:
henkaku/henkaku: Homebrew enabler for PS Vita发布时间:2022-06-14
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap