Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

ubuntu 16.10 libpng12.so.0: cannot open shared object file #76

Open
capaj opened this issue Feb 16, 2017 · 8 comments
Open

ubuntu 16.10 libpng12.so.0: cannot open shared object file #76

capaj opened this issue Feb 16, 2017 · 8 comments

Comments

@capaj
Copy link

capaj commented Feb 16, 2017

Running on: "image-webpack-loader": "^3.2.0", I always get these errors:

Error in ./images/chat-sprite.png
Module build failed: Error: /home/capaj/git_projects/be/chat-window/node_modules/pngquant-bin/vendor/pngquant: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
 @ ./styles/main.less 6:22437-22473 6:23930-23966 6:28534-28570 6:32673-32709 6:34586-34622 6:36817-36853 6:37912-37948

I researched a bit and tried installing

sudo apt-get install libpng12-0
sudo apt-get install libpng-dev

I eve tried sudo apt install pngquant
but no luck. Has anyone been able to make this work on latest ubuntu?

@timur-orudzhov
Copy link

encounter with the same issue

@capaj
Copy link
Author

capaj commented Feb 20, 2017

Closing because this is a yarn issue. So when I did:

npm i image-webpack-loader pngquant

it works fine. Seems like yarn is not able to execute the postinstall npm script correctly. @timur-orudzhov are also on yarn? or NPM?

@capaj capaj closed this as completed Feb 20, 2017
@timur-orudzhov
Copy link

@capaj on npm

@capaj capaj reopened this Feb 20, 2017
@enapupe
Copy link

enapupe commented Mar 8, 2017

I'm having the same issue, even with that trick #76 (comment) mentioned. Weirdly it works on my local machine but not on docker build.

@enapupe
Copy link

enapupe commented Mar 8, 2017

Well. My issue was actually my mistake and might be yours if you are using docker.
I was replacing docker's node_modules folder when running COPY . /usr/app so the local binary was linked to this lib that obviously wasn't available at the docker machine. Simple adding node_modules to .dockerignore fixed it.

@maraisr
Copy link

maraisr commented Apr 30, 2017

So apparently its an issue with later versions of Ubuntu - see https://askubuntu.com/a/895903/250605. @capaj

@magiccookie
Copy link

magiccookie commented Jun 5, 2017

I had this issue, but I happed to have missing automake
sudo apt-get install automake

After, it works both with yarn and npm

yarn --version
0.24.5

@Jason-Cooke
Copy link

@enapupe Cheers, you helped solve my issue! I had placed the node_modules in my dockerignore file, but when mounting the root project directory the node_modules where added back in. So I mounted my projects src directory instead.

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

No branches or pull requests

6 participants