question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

php: error while loading shared libraries: libtinfo.so.6

See original GitHub issue

Really nice project!

I will try to deploy with now my slim api projet.

now.json

{
    "functions": {
      "public/*.php": {
        "runtime": "now-php@0.0.8"
      }
    }
  }

composer.json

{
    "require": {
        "php": "^7.3",
        "slim/slim": "^4.3",
        "slim/psr7": "^0.6.0",
        "vlucas/phpdotenv": "^4.0"
    }
}

I got this error log on my now instance :

05:34:54 PM | Downloading 234 deployment files...
-- | --
05:35:07 PM | Installing build runtime...
05:35:10 PM | Build runtime installed: 2752.461ms
05:35:11 PM | Looking up build cache...
05:35:12 PM | 🐘 Installing Composer deps.
05:35:12 PM | php: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
05:35:12 PM | Error: Exited with 127
05:35:12 PM | at ChildProcess.child.on (/zeit/fa5b89e012ce722c/.build-utils/.builder/node_modules/now-php/dist/utils.js:151:24)
05:35:12 PM | at emitTwo (events.js:126:13)
05:35:12 PM | at ChildProcess.emit (events.js:214:7)
05:35:12 PM | at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
05:35:12 PM | worker exited with code 1 and signal null
05:35:12 PM | done
05:35:13 PM | Installing build runtime...
05:35:14 PM | Build runtime installed: 491.000ms
05:35:14 PM | Looking up build cache...
05:35:16 PM | 🐘 Installing Composer deps.
05:35:16 PM | php: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
05:35:16 PM | Error: Exited with 127
05:35:16 PM | at ChildProcess.child.on (/zeit/fa5b89e012ce722c/.build-utils/.builder/node_modules/now-php/dist/utils.js:151:24)
05:35:16 PM | at emitTwo (events.js:126:13)
05:35:16 PM | at ChildProcess.emit (events.js:214:7)
05:35:16 PM | at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
05:35:16 PM | worker exited with code 1 and signal null
05:35:16 PM | done
05:35:16 PM | Installing build runtime...
05:35:17 PM | Build runtime installed: 518.264ms
05:35:17 PM | Looking up build cache...
05:35:19 PM | 🐘 Installing Composer deps.
05:35:19 PM | php: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
05:35:19 PM | Error: Exited with 127
05:35:19 PM | at ChildProcess.child.on (/zeit/fa5b89e012ce722c/.build-utils/.builder/node_modules/now-php/dist/utils.js:151:24)
05:35:19 PM | at emitTwo (events.js:126:13)
05:35:19 PM | at ChildProcess.emit (events.js:214:7)
05:35:19 PM | at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
05:35:19 PM | worker exited with code 1 and signal null
05:35:19 PM | done
05:35:20 PM | Installing build runtime...
05:35:20 PM | Build runtime installed: 408.707ms
05:35:21 PM | Looking up build cache...
05:35:22 PM | 🐘 Installing Composer deps.
05:35:23 PM | php: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
05:35:23 PM | Error: Exited with 127
05:35:23 PM | at ChildProcess.child.on (/zeit/fa5b89e012ce722c/.build-utils/.builder/node_modules/now-php/dist/utils.js:151:24)
05:35:23 PM | at emitTwo (events.js:126:13)
05:35:23 PM | at ChildProcess.emit (events.js:214:7)
05:35:23 PM | at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
05:35:23 PM | worker exited with code 1 and signal null
05:35:23 PM | done
05:35:23 PM | Installing build runtime...
05:35:23 PM | Build runtime installed: 415.674ms
05:35:24 PM | Looking up build cache...
05:35:26 PM | 🐘 Installing Composer deps.
05:35:26 PM | php: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
05:35:26 PM | Error: Exited with 127
05:35:26 PM | at ChildProcess.child.on (/zeit/fa5b89e012ce722c/.build-utils/.builder/node_modules/now-php/dist/utils.js:151:24)
05:35:26 PM | at emitTwo (events.js:126:13)
05:35:26 PM | at ChildProcess.emit (events.js:214:7)
05:35:26 PM | at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
05:35:26 PM | worker exited with code 1 and signal null
05:35:28 PM | done

Any tips?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
f3l1xcommented, Jan 10, 2020

I’ve discussed it with @styfle and problem is in building phase.

Build container during building phase uses AL1 (amazonlinux:2017.03.1.20170812). That’s the problem. PHP 7.4 is compiled for runtime container running on Amazon Linux 2.

Only installing Composer dependencies is affected. Not the runtime (I think). Using prepacked Composer dependencies might work for now.

First things came in my mind are:

  • use prepacked dependencies (for now) and put composer.json in .nowignore file
  • use PHP 7.3 for installing composer dependencies
  • somehow compile PHP 7.4 for AL1 and use it in build phase
  • build special lambda for installing Composer dependencies, take composer.json|lock, send them there and download dependencies (vendor)

Any other thoughts?


More sources:

2reactions
f3l1xcommented, Jan 15, 2020

Could you guys @AGDholo @ebauger @kolyasapphire test this setup?

  "functions": {
    "api/index.php": {
      "runtime": "now-php@0.0.9-experimental.1"
    }
  }
Read more comments on GitHub >

github_iconTop Results From Across the Web

error while loading shared libraries: libtinfo.so.6 (4368868)
/opt/quest/bin/.ktutil: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
Read more >
When in conda, tmux and emacs throw "error while loading ...
Yet when trying to start either tmux or emacs , I get this error: error while loading shared libraries: libtinfo.so.6: cannot open shared...
Read more >
error loading shared libraries: libtinfo.so.5 - freebasic.net
I am using Ubuntu-Mate 21.10, installed FBC but I get this error when running it. > fbc: error while loading shared libraries: ...
Read more >
Solving The “Cannot Open Shared Object File - Baeldung
In this tutorial, we'll go through various causes and fixes for the “cannot open shared object file: No such file or directory” error...
Read more >
clang: error while loading shared libraries: libtinfo.so.5: cannot ...
There's two possible solutions you can try: libtinfo.o.6 comes with the Apt package libtinfo6 . The version you were using has its own...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found