Meteor 1.3 throws error: cannot open shared object file: No such file or directory


#1

I recently upgraded from Meteor 1.2 to Meteor 1.3.2.4. Updated to use their package.json system, as well as mupx instead of mup, but not sure if either of those are related here. I had been using node-canvas which required special installation of libraries, including cairo, as well as canvas, on the server. Previously I followed the instructions here:

Now when I run the code that calls the server canvas library, it throws the error below on the server (which I can see with mupx logs -f). Is there something different in Meteor 1.3 about how it finds libraries?

Exception while invoking method ‘loadImagesCreateCollageAndPopup2’ Error: libcairo.so.2: cannot open shared object file: No such file or directory
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/bundle/bundle/programs/server/npm/node_modules/canvas/lib/bindings.js:2:18)
[104.236.136.21] at Module._compile (module.js:456:26)
at Object.Module._extensions…js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)


#2

Hello,

I have the same problem

Exception while invoking method ‘handleRequest’ Error: libcairo.so.2: cannot open shared object file: No such file or directory
[104.236.148.223] at Module.load (module.js:356:32)
[104.236.148.223] at Function.Module._load (module.js:312:12)
[104.236.148.223] at Module.require (module.js:364:17)
[104.236.148.223] at require (module.js:380:17)
[104.236.148.223] at Object. (/bundle/bundle/programs/server/npm/node_modules/qrcode/node_modules/canvas/lib/bindings.js:3:18)
[104.236.148.223] at Module._compile (module.js:456:26)
[104.236.148.223] at Object.Module._extensions…js (module.js:474:10)
[104.236.148.223] at Module.load (module.js:356:32)
[104.236.148.223] at Function.Module._load (module.js:312:12)
[104.236.148.223] at Module.require (module.js:364:17)

@silverbuggy did you find a solution for your problem?


#3

Yes @ziedmahdi, I found out mupx was the problem. If I use mup, it works fine. Were you using mupx?


#4

@silverbuggy yes indeed, I am using mupx. So this is related to docker.


#5

@ziedmahdi Unfortunately I’m not familiar with docker. I had decided to use mupx the same time I upgraded to meteor 1.3. If you find a way to make it work with mupx, let me know! If you want to use mup and have any problems, let me know and I can help you privately with the exact steps I used to create the digital ocean server instance, install nodejs/cairo, etc.


#6

Thank you very much.
Sure, I will let you know if I found a solution with mupx.


#7

I am getting this error with mupx deployment on meteor 1.3.2.4 app - is it at all related? https://github.com/arunoda/meteor-up/issues/1028


#8

@tomtom87 for me the deployment was successful, but the cairo error shows up on the server when trying to make the call that requires that library. So I think it’s a different problem…


#9

@silverbuggy what version of meteor and mupx are you using mate?


#10

@silverbuggy just to check are you using https://github.com/arunoda/meteor-up or https://github.com/kadirahq/meteor-up