Error installing heroku pkg-config file

I am trying to install phash on heroku using https://github.com/ddollar/heroku-buildpack-apt . I would like to use it in my node.js application using https://github.com/mgmtio/phash-image .

I currently have Aptfile

:

cimg-dev
libphash0-dev
libmagickcore-dev

      

However, I am currently getting the following error:

remote:        > phash-image@3.0.0 install /tmp/build_52b169122dc28a567a6f55c3b892c560/node_modules/phash-image
remote:        > node-gyp rebuild
remote:        
remote:        Package pHash was not found in the pkg-config search path.
remote:        Perhaps you should add the directory containing `pHash.pc'
remote:        to the PKG_CONFIG_PATH environment variable
remote:        No package 'pHash' found
remote:        gyp: Call to 'pkg-config --libs-only-L --libs-only-other pHash' returned exit status 1. while trying to load binding.gyp
remote:        gyp ERR! configure error 
remote:        gyp ERR! stack Error: `gyp` failed with exit code: 1
remote:        gyp ERR! stack     at ChildProcess.onCpExit (/tmp/build_52b169122dc28a567a6f55c3b892c560/vendor/node/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16)
remote:        gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
remote:        gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
remote:        gyp ERR! System Linux 3.8.11-ec2
remote:        gyp ERR! command "node" "/tmp/build_52b169122dc28a567a6f55c3b892c560/vendor/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
remote:        gyp ERR! cwd /tmp/build_52b169122dc28a567a6f55c3b892c560/node_modules/phash-image
remote:        gyp ERR! node -v v0.10.33
remote:        gyp ERR! node-gyp -v v1.0.1
remote:        gyp ERR! not ok 

      

what does it mean? how do i fix it?

+3


source to share


2 answers


Sorry guys! the problem was one of my other prefabs inserted the config path. it makes sense fixed!



0


source


The error says the pHash package was not found in the pkg-config search path. You must add the directory containing "pHash.pc" to the PKG_CONFIG_PATH environment variable. No path to pHash has been established.

Try:

$ PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
$ export PKG_CONFIG_PATH

      

and then rebuild.

If it doesn't work



$ locate pHash.pc

      

this will give you the path to pHash.pc. Use the path (minus pHash.pc) and add it toPKG_CONFIG_PATH

$ export PKG_CONFIG_PATH= <path_here>

      

A similar issue was raised here in node githib canvas

+4


source







All Articles