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

Recurrent pixman not found on path #1065

Closed
staminna opened this issue Dec 21, 2017 · 20 comments
Closed

Recurrent pixman not found on path #1065

staminna opened this issue Dec 21, 2017 · 20 comments

Comments

@staminna
Copy link

After installing pixman from source, I set it on bash_profile after rebuilding node-gyp

`> node-gyp rebuild

Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing pixman-1.pc' to the PKG_CONFIG_PATH environment variable No package 'pixman-1' found gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code

I also tried installing pixman with brew and macports, but the issue always resets to this error message, even after successful install.

My Environment

  • Version of node-canvas (e.g. 1.4.0):
  • Environment (e.g. node 8.1.0 on Mac OS X 10.13.1):
@jayrmotta
Copy link

Any updates on this?

@jayrmotta
Copy link

I had to install via brew (since I'm on a mac) pixman, cairo and pango.

Now it works!

@evaristoc
Copy link

evaristoc commented Dec 9, 2018

Hi,

Having same error as for this issue when trying npm,
-- Linux 18.04
-- npm 4.2.0
-- node.js v7.10.0

Part of my error output:

Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pixman-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pixman-1' found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp

UPDATE:
I installed the corresponding dependencies:

sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

But then I got a different error in one of the files:

../src/CanvasRenderingContext2d.cc: In static member function ‘static Nan::NAN_SETTER_RETURN_TYPE Context2d::SetCurrentTransform(v8::Local<v8::String>, v8::Local<v8::Value>, Nan::NAN_SETTER_ARGS_TYPE)’:
../src/CanvasRenderingContext2d.cc:1722:49: error: ‘class v8::Object’ has no member named ‘InstanceOf’
   if (!Nan::To<Object>(value).ToLocalChecked()->InstanceOf(ctx, _DOMMatrix.Get(Isolate::GetCurrent())).ToChecked())
                                                 ^~~~~~~~~~

Any comment?

@evaristoc
Copy link

evaristoc commented Dec 9, 2018

^^^

Ok: I found this:
#1319

See my environment above

@paleo
Copy link

paleo commented Jul 7, 2020

On Ubuntu 20.04:

sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev

@LordRampantHump
Copy link

On Ubuntu 20.04:

sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev

This was the solution for me. Thank you

@lrettig
Copy link

lrettig commented Jan 10, 2021

Ran into this today and installing these packages didn't do it. Using earlier versions of Python and Node did the trick - canvas doesn't seem to play nice with Node 15 (and node-gyp doesn't like Python 3.9). See #1319 (comment).

@williamscs
Copy link

This seems to have been fixed in the 2.7.0 release. I was able to run an npm install using Node 15 without any failures from node-gyp.

Using one of the 2.6.x versions, I was hitting the same pixman errors mentioned above.

@Layarks
Copy link

Layarks commented Aug 27, 2021

On Ubuntu 20.04:

sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev

This solution is workable for me, most articles only mentioned the following update but NOT work
apt-get install libmount-dev

@owenventer
Copy link

I had to install via brew (since I'm on a mac) pixman, cairo and pango.

Now it works!

How did you do that?

@nb312
Copy link

nb312 commented Apr 8, 2022

On Ubuntu 20.04:

sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev

Thanks for the solutions.

@thomasaarholt
Copy link

I had to install via brew (since I'm on a mac) pixman, cairo and pango.
Now it works!

How did you do that?

I installed it like this:

brew install pixman cairo pango

I had to do this in order to install the development version of jupyterlab

@Ginxo
Copy link

Ginxo commented Oct 14, 2022

This command for Fedora

dnf install libjpeg-devel giflib-devel pixman-devel cairo-devel pango-devel

@TANK-RICHARD
Copy link

On Ubuntu 20.04:

sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev

It's really usefully on Ubuntu 18.04, Thank U.

adamhurm added a commit to adamhurm/discord-super-pal-of-the-week that referenced this issue Nov 6, 2022
@92hackers
Copy link

I'm on Ubuntu 22.04
sudo apt install libpixman-1-dev libcairo2-dev libpango1.0-dev libjpeg8-dev libgif-dev
also works, thanks.

@LinusU LinusU closed this as completed Nov 18, 2022
@sharq88
Copy link

sharq88 commented Nov 29, 2022

Rocky linux 9 giflib-devel was not available needed a flag:

dnf --enablerepo=devel install -y cairo-devel pango-devel libjpeg-turbo-devel giflib-devel pixman-devel

@sanchisingh01
Copy link

i'm trying to install pixman on windows 11 using msys2, i'm having a lot of trouble installing pixman and i'm thinking if i should just switch to Ubuntu?

@paulo-roberto-rosa
Copy link

This seems to have been fixed in the 2.7.0 release. I was able to run an npm install using Node 15 without any failures from node-gyp.

Using one of the 2.6.x versions, I was hitting the same pixman errors mentioned above.

what do you mean by using 2.7.0? the latest canvas version as of 2023 is 2.11.2

@paulo-roberto-rosa
Copy link

I had to install via brew (since I'm on a mac) pixman, cairo and pango.

Now it works!

For those homebrew did not work (as of me for example):

I am using Mac OSX with M1 Chip and I was not able to install dependencies and also not able to run unit tests because of that. After trying several solutions, I found out the cause, it was homebrew that was not configuring pkg-config properly after installing it.

So what solved was to use Mac Ports to install pkg-config and pango:
after running: sudo port install pkgconfig pango

and wait for long 40 minutes, I can finally install everything properly on the project and no more canvas errors showing up and I can finally run unit tests again :) thank god. i spent 1 week trying to solve that one.

@ambroselittle
Copy link

You're a 👑, @paulo-roberto-rosa. That worked on my M3, too. 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests