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下的一 ...
随机推荐
- [BZOJ1101&BZOJ2301][POI2007]Zap [HAOI2011]Problem b|莫比乌斯反演
对于给定的整数a,b和d,有多少正整数对x,y,满足x<=a,y<=b,并且gcd(x,y)=d. 我们可以令F[n]=使得n|(x,y)的数对(x,y)个数 这个很容易得到,只需要让x, ...
- TCP之connect
1. connect函数: #include <sys/socket.h> int connect(int sockfd, const struct sockaddr *servaddr, ...
- 使用 ftrace 调试 Linux 内核【转】
转自:http://blog.csdn.net/adaptiver/article/details/7930646 使用 ftrace 调试 Linux 内核,第 1 部分 http://blog.c ...
- C语言inline函数(转)
原文链接:http://blog.csdn.net/yuan1125/article/details/6225993 1 inline只是个编译器建议,编译器不一定非得展开Inline函数. 例如: ...
- Median_of_Two_Sorted_Arrays(理论支持和算法总结)
可以将这个题目推广到更naive的情况,找两个排序数组中的第K个最大值(第K个最小值). 1.直接 merge 两个数组,然后求中位数(第K个最大值或者第K个最小值),能过,不过复杂度是 O(n + ...
- JVM核心机制(类加载器、三种类加载器、代理加载模式、双亲委派机制
- three.js、webGL、canvas区别于关联
canvas是html5新定义的一个标签,用于做图形容器 webgl要依赖canvas运行. three.js是以webgl为基础的库,封装了一些3D渲染需求中重要的工具方法与渲染循环.
- Codeforces 877C Slava and tanks(思维)
题目链接:http://codeforces.com/problemset 题目大意:有n个格子,某些格子里可能有一个或多个坦克,但不知道具体位置,每个坦克被轰炸一次就会移动到相邻的格子里(第1个格子 ...
- Convert Sorted List to Binary Search Tree&&Convert Sorted Array to Binary Search Tree——暴力解法
Convert Sorted List to Binary Search Tree Given a singly linked list where elements are sorted in as ...
- opencv的使用——经典大坑
视频或相机中读入的帧数不对,或有空帧 image check from cap or video: you must check wether each frame is not empty when ...