3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

herokuでlibSM.so.6のインポートエラー発生したときの解決メモ

3
Posted at

環境

heroku/7.16.0 linux-x64 node-v10.10.0

エラー

herokuでopenCVとか使うpythonのやつデプロイすると,herokuのログに

Import Error: libSM.so.6: cannot open ~~

こんなのが出る

対処

こちらの通りにやればできる
https://stackoverflow.com/questions/49469764/how-to-use-opencv-with-heroku/51004957#51004957

簡単な手順

  1. heroku-buildpack-aptを追加する
$ heroku buildpacks:add --index 1 https://github.com/heroku/heroku-buildpack-apt

2.Aptfileをつくる

Aptfile
libsm6
libxrender1
libfontconfig1
libice6

3.デプロイ

$ git add .
$ git commit -m "add Aptfile"
$ git push heroku master

以上

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?