Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gyp installation error: No package 'cairo' found #10

Open
hced opened this issue Oct 18, 2014 · 1 comment
Open

Gyp installation error: No package 'cairo' found #10

hced opened this issue Oct 18, 2014 · 1 comment

Comments

@hced
Copy link

hced commented Oct 18, 2014

Just curious if this affects anything down the line? Or if you can safely disregard this gyp error when installing metalsmith-stylus? I also posted a workaround that worked out for me in my second comment.

~/Dev/myProject
❯ npm install --save metalsmith-stylus

> [email protected] install /Users/H/Dropbox/Dev/myProject/node_modules/metalsmith-stylus/node_modules/canvas
> node-gyp rebuild

Package cairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `cairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'cairo' found
gyp: Call to './util/has_cairo_freetype.sh' returned exit status 0. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/H/Dropbox/Dev/myProject/node_modules/metalsmith-stylus/node_modules/canvas
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing [email protected]
[email protected] node_modules/metalsmith-stylus
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected])

~/Dev/myProject  6s
@hced
Copy link
Author

hced commented Oct 18, 2014

FYI, I fixed this by installing cairo and pixman and then re-ran npm install --save metalsmith-stylus.

I posted a gist if anyone's interested. Or if you're lazy, you may just run this command and follow instructions:

echo "$(\curl -Gs https://gist.githubusercontent.com/hced/8e816a83aacf4d7e2c2d/raw/fb45b07da479b357bed1ae806e29efad53f397a0/install_cairo.sh)" >| /tmp/install_cairo.sh && bash /tmp/install_cairo.sh

@hced hced closed this as completed Oct 18, 2014
@hced hced reopened this Oct 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant