Brew error: Could not symlink, path is not writable

2015-12-11 18:17:01

When I try to link a library with homebrew ( brew link libtool), I got the following error:

Linking /usr/local/Cellar/libtool/2.4.6…  
Error: Could not symlink lib/libltdl.7.dylib  
/usr/local/lib is not writable.

As explained here by Rick:

Start with brew doctor which will show you errors with your brew setup.

You might see something like this: "Warning: /usr/local/lib isn't writable."

It will give you the advice that: "You should probably chown /usr/local/lib/pkgconfig".

This means:  sudo chown {your-user-name} /usr/local/lib

Then you will need to link the files with this: brew link yourLibrary

If this does not work hopefully the output of brew doctor will give you enough to continue the search.

 

js按比例缩放图片并显示图片的一部分

$(document).ready(function(){ //取得图片外层div的宽度 var boxwidth = $(‘.media-object’).parent().width(); var boxheight = boxwidth*9/16; var imgarray = $(‘.media-object’); for(var i=0;i<imgarray.length;i++){ //获取图片原始长、宽 var width = imgarray[i].width ; var height = imgarray[i].height; //判断图片长宽比例 if( width*9/16 > boxheight ){ //使用宽度按16:9的比例缩放后高度不够,转而使用高度 //此时图片高度应该设为div高 boxheight

Nodejs package.json

pacakage.json中各属性说明 “name”:包名。 “description”:包简介。 “author”:包作者。 “version”:版本号。 “repository”:源码托管地址。 “maintainers”:包维护者列表,一般由name,email,web三个属性组成。 “contributors”:贡献者列表。 “dependencies”:当前包使用时所需要依赖包的列表。 devDependencies:当前包开发时所需要依赖包的列表。 keywords:关键词数组。 main:模块引入入口。 scripts:脚本说明对象。主要被包管理器用来安装、编译、测试和卸载包。