Mac下配置PHP支持GD库FreeType
一句话脚本
curl -s http://php-osx.liip.ch/install.sh | bash -s 5.6
记得要翻墙哦。
或者下面代码保存成.sh ,代码从http://php-osx.liip.ch/install.sh文件中拷贝的。
#!/bin/bash # package type (subfolder in packager) # default version to install
DEFAULT=5.6 if [ -z $1 ]; then
TYPE=$DEFAULT
else
TYPE=$1
fi if [[ $TYPE != "force" ]]; then
OS_VERSION=`sw_vers -productVersion | egrep --color=never -o '10\.[0-9]+'`
if [[ $OS_VERSION == "10.13" ]]; then
echo "****"
echo "[WARNING]"
echo "Detected macOS High Sierra 10.13. As this is quite new, there may be issues still. Your mileage may vary."
echo "****"
sleep 2
elif [[ $OS_VERSION == "10.12" ]]; then
echo "Detected macOS Sierra 10.12. All ok."
elif [[ $OS_VERSION == "10.11" ]]; then
echo "Detected OS X El Capitan 10.11. All ok."
elif [[ $OS_VERSION == "10.10" ]]; then
echo "Detected OS X Yosemite 10.10. All ok."
elif [[ $OS_VERSION == "10.9" ]]; then
echo "Detected OS X Mavericks 10.9 All ok."
elif [[ $OS_VERSION == "10.8" ]]; then
echo "Detected OS X Mountain Lion 10.8 All ok."
elif [[ $OS_VERSION == "10.7" ]]; then
echo "Detected OS X Lion 10.7. All ok."
elif [[ $OS_VERSION == "10.6" ]]; then
echo "Detected OS X Snow Leopard 10.6 All ok."
else
echo "****"
echo "Your version of OS X ($OS_VERSION) is not supported, you need at least 10.6"
echo "Stopping installation..."
echo "If you think that's wrong, try"
echo "****"
echo "curl -o install.sh -s https://php-osx.liip.ch/install.sh | bash install.sh force"
echo "****"
exit 2
fi
if [[ -f /usr/sbin/sysctl ]]; then
SYSCTL="/usr/sbin/sysctl"
elif [[ -f /sbin/sysctl ]]; then
SYSCTL="/sbin/sysctl"
else
SYSCTL="sysctl"
fi HAS64BIT=`$SYSCTL -n hw.cpu64bit_capable 2> /dev/null`
if [[ $HAS64BIT != 1 ]]; then
echo "****"
echo "ERROR! 32 BIT NOT SUPPORTED!"
echo "****"
echo "No 64bit capable system found. Your hardware is too old."
echo "We don't support that (yet). Patches are welcome ;)"
echo "If you think that's wrong, try"
echo "****"
echo "curl -o install.sh -s https://php-osx.liip.ch/install.sh | bash install.sh force"
echo "****"
exit 1
fi
fi if [[ $TYPE = "force" ]]; then
if [ -z $2 ]; then
TYPE=$DEFAULT
else
TYPE=$2
fi
fi if [[ $OS_VERSION = "10.8" ]] || [[ $OS_VERSION = "10.9" ]]; then
if [[ $TYPE = "5.4" ]]; then
TYPE=5.4-10.8
elif [[ $TYPE = "5.5" ]]; then
TYPE=5.5-10.8
elif [[ $TYPE = "5.6" ]]; then
TYPE=5.6-10.8
elif [[ $TYPE = "5.3" ]]; then
TYPE=5.3-10.8
fi
fi # 10.11 & 10.12 should be compatible with 10.10 versions for now.
# See https://github.com/liip/build-entropy-php/issues/16 for more
if [[ $OS_VERSION = "10.11" ]] || [[ $OS_VERSION = "10.12" ]] || [[ $OS_VERSION = "10.13" ]] || [[ $OS_VERSION = "10.10" ]]; then
if [[ $TYPE = "5.4" ]]; then
TYPE=5.4-10.10
elif [[ $TYPE = "5.5" ]]; then
TYPE=5.5-10.10
elif [[ $TYPE = "5.6" ]]; then
TYPE=5.6-10.10
elif [[ $TYPE = "7.0" ]]; then
TYPE=7.0-10.10
elif [[ $TYPE = "7.1" ]]; then
TYPE=7.1-10.10
elif [[ $TYPE = "7.2" ]]; then
TYPE=7.2-10.10
elif [[ $TYPE = "5.3" ]]; then
TYPE=5.3-10.10
fi
fi if [[ $TYPE = "5.6" ]]; then
echo "PHP 5.6 is not available for OS X < 10.8"
exit 1
elif [[ $TYPE = "7.2" ]]; then
echo "PHP 7.2 is not available for OS X < 10.10"
exit 1
elif [[ $TYPE = "7.1" ]]; then
echo "PHP 7.1 is not available for OS X < 10.10"
exit 1
elif [[ $TYPE = "7.0" ]]; then
echo "PHP 7.0 is not available for OS X < 10.10"
exit 1
fi echo "Get packager.tgz";
curl -s -o /tmp/packager.tgz https://s3-eu-west-1.amazonaws.com/php-osx.liip.ch/packager/packager.tgz echo "Unpack packager.tgz";
echo "Please type in your password, as we want to install this into /usr/local"
if [ ! -d /usr/local ] ; then sudo mkdir /usr/local; fi
sudo tar -C /usr/local -xzf /tmp/packager.tgz if [[ -f /usr/bin/python2.7 ]]; then
PYTHONPATH=/usr/bin/python2.7
elif [[ -f /usr/bin/python2.6 ]]; then
PYTHONPATH=/usr/bin/python2.6
elif [[ -f /usr/bin/python ]]; then
PYTHONPATH=/usr/bin/python
else
PYTHONPATH=$(which python)
fi echo "Start packager (may take some time) using $PYTHONPATH"; sudo $PYTHONPATH /usr/local/packager/packager.py install $TYPE-frontenddev
cd $ORIPWD
echo "Finished."
Mac下配置PHP支持GD库FreeType的更多相关文章
- (转)本地搭建环境wamp下提示不支持GD库的解决方法
转自:http://www.zzdp.net/local-wamp-gd GD库是什么?GD库,是php处理图形的扩展库,GD库提供了一系列用来处理图片的API,使用GD库可以处理图片,或者生成图片. ...
- 配置php支持gd函数模块
配置php支持gd函数模块 今天在联系上线源码包tttuangou 的时候,出现了对gd_info和imagecreatefromjpeg模块缺失的提示,我丈二和尚摸不着头脑,决定彻底学习一番 什么是 ...
- 如何在Mac下配置Github和Bitbucket的SSH
--- title: 如何在Mac下配置Github和Bitbucket的SSH date: 2017-12-23 21:10:30 tags: - Mac - Git - Github catego ...
- CAS (8) —— Mac下配置CAS到JBoss EAP 6.4(6.x)的Standalone模式(服务端)
CAS (8) -- Mac下配置CAS到JBoss EAP 6.4(6.x)的Standalone模式(服务端) jboss版本: jboss-eap-6.4-CVE-2015-7501 jdk版本 ...
- CAS (7) —— Mac下配置CAS 4.x的JPATicketRegistry(服务端)
CAS (7) -- Mac下配置CAS 4.x集群及JPATicketRegistry(服务端) tomcat版本: tomcat-8.0.29 jdk版本: jdk1.8.0_65 cas版本: ...
- Tomcat (1) —— Mac下配置Tomcat Https/SSL
Tomcat (1) -- Mac下配置Tomcat Https/SSL tomcat版本: tomcat-8.0.29 jdk版本: jdk1.8.0_65 参考来源: SSL/TLS Config ...
- 【高可用HA】Apache (3) —— Mac下配置Apache Httpd负载均衡(Load Balancer)之mod_proxy
Mac下配置Apache Httpd负载均衡(Load Balancer)之mod_proxy httpd版本: httpd-2.4.17 参考来源: Apache (1) -- Mac下安装Apac ...
- mac下使用clion构建boost库
mac下使用clion构建boost库 使用brew install boost 完成后发现boost被安装在在/usr/local/Cellar/boost下 jetbrain给出的指导意见 htt ...
- cenos 上的php 支持GD库问题
---恢复内容开始--- thinkphp 开发的项目verify类无法引用,原因是没有开启gd库 环境:CentOS 6.4,php-5.3.3需求:php支持GD库解决方案:GD是Linux下的一 ...
随机推荐
- 招人不是HR第一职责,留住人才是
什么是HR的第一责任?我希望你们知道,招人不是你的第一职责,留住人才是你的第一职责.HR工作是相当难做的,你们是公司集团内里各个部门中最难做的部门,也是最具战略性的部门. 以人为本,这个“人”就是阿里 ...
- PHP练习4 留言板
一.要求 二.示例页面 三.网页代码及网页显示 1.denglu.php 登录页面 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tran ...
- 关于C++的宏:WIN32和DEBUG
判断平台相关,判断程序是属于debug版本还是release版本,我们会这么做. #ifdef WIN32 #else #endif #ifdef DEBUG // 如果是调试版本 #else //发 ...
- Ubuntu安装pip
首先打开终端 在终端输入:sudo apt-get install python-pip python-dev build-essential [+] 如果需要在Python3下安装pip,那么在py ...
- 用pyperclip 模块拷贝粘贴字符串
>>> import pyperclip>>> pyperclip.copy('Hello world!')>>> pyperclip.paste ...
- sicily 1046. Plane Spotting
1046. Plane Spotting Time Limit: 1sec Memory Limit:32MB Description Craig is fond of planes. Mak ...
- 1.ubuntu的安装
分两种 1. 在VMware中安装,则与Centos的安装类似 2. 在VirtualBox里安装 --> 1. 先“新建” 一个虚拟电脑 2. 根据需求编辑虚拟电脑的信息 (具体的大小.内存等 ...
- C++变量类型转换
1:int转换为CString CString str; str.Format("As string: %d", int); 2:double转换为CString CString ...
- 10:django 模板语言
Django的模板语言的目的是取得力量和易用性之间的平衡,与其他的模板语言相比,django模板语言显得更简单,更专一, django模板系统由模板,变量,过滤器,标签,注释等主要部分组成 模板 一个 ...
- MySQL关键字大全
转载自:https://blog.csdn.net/benxiaohai888/article/details/77803090 在使用MySQL的时候,一般尽量避免用关键字作为表名,如使用关键字做表 ...