mac下安装php-memcached提示configure: error: memcache support requires ZLIB. Use –with-zlib-dir= to specify prefix where ZLIB解决办法

 

checking for the location of zlib... configure: error: memcache supportrequires ZLIB. Use --with-zlib-dir= to specify prefix where ZLIB 

brew install zlib
brew link --force zlib

默认用brew 安装zlib提示有可能会跟系统的zlib库冲突,没有吧zlib库link到系统目录
重新安装xcode,然并卵

xcode-select --installbrew install php{xx}-memcache

精简mac ox

忽然发现mbp的250GB硬盘只剩下20GB左右了,遂准备清理下硬盘,打开finder看一下几个常用目录右键查看简介,哪个目录的占用空间最大,先把应用程序里暗黑三给删掉了,mac下还是纯粹做开发机用的了,玩放到台机上去玩,应用程序里按文件大小排序,发现Xcode居然是个巨无霸,其他应用普遍在300MB以下,它却占了8GB,右键显示内容,进去后Contents/Developer/Platforms删掉watch、ios虚拟机的目录,反正就算开发我也会在真机上做的,删除,倾倒废纸篓,xcode尺寸直接少了5GB。应用程序最终占用了10~20GB,毕竟常用的软件还是不少。

虚拟机是我的必备装备,把多余的linux和windows虚拟机删掉,80GB 腾出来了….

homebrew缓存路径

由于在终端下载速度太慢,遂考虑先通过地址下载文件后手动放到 缓存目录
$wget https://homebrew.bintray.com/bottles/mysql-5.6.26.yosemite.bottle.tar.gz
$cd /Library/Caches/Homebrew/
$mv ~/mysql-5.6.26.yosemite.bottle.tar.gz ./
$brew install mysql

done!

==> Downloading https://homebrew.bintray.com/bottles/mysql-5.6.26.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/mysql-5.6.26.yosemite.bottle.tar.gz
==> Pouring mysql-5.6.26.yosemite.bottle.tar.gz
==> /usr/local/Cellar/mysql/5.6.26/bin/mysql_install_db –verbose –user=zouyi –basedir=/usr/local/Cellar/mysql/5.6.26 –
==> Caveats
A “/etc/my.cnf” from another install may interfere with a Homebrew-built
server starting up correctly.

To connect:
mysql -uroot

To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
Or, if you don’t want/need launchctl, you can just run:
mysql.server start
==> Summary
🍺 /usr/local/Cellar/mysql/5.6.26: 9854 files, 339M

Mac下MySql卸载方法

Mac下MySql卸载方法

mac下mysql的DMG格式安装内有安装文件,却没有卸载文件……很郁闷的事。
网上搜了一下,发现给的方法原来得手动去删。
很多文章记述要删的文件不完整,后来在stackoverflow这里发现了一个遗漏的地方,所以将完整版记述在这里,以供查阅。
先停止所有mysql有关进程。

最后这条很多文章都丢了,切记切记。

 

sudo rm /usr/local/mysql sudo rm -rf /usr/local/mysql*sudo rm -rf /Library/StartupItems/MySQLCOM sudo rm -rf /Library/PreferencePanes/My*vim /etc/hostconfig and removed the line MYSQLCOM=-YES-rm -rf ~/Library/PreferencePanes/My*sudo rm -rf /Library/Receipts/mysql*sudo rm -rf /Library/Receipts/MySQL*sudo rm -rf /var/db/receipts/com.mysql.*