R
Railway8mo ago
Nie

ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory

Something is being messed up in the C libraries and I don't know how to fix it. Context: My Development Setup Environment: Python 3.11 (Pipenv) Operating System: NixOS I also installed a Python package: google-cloud-firestore which depends on C libraries. Now, I don't really know how to install the C library(ies) required to use google-cloud-firestore, so I just use steam-run. It basically runs my program in an FHS environment so I don't have to go to the trouble of installing dependencies manually. That works great. I run my program with this command:
steam-run pipenv run ...
steam-run pipenv run ...
I can't run it with just:
pipenv run ...
pipenv run ...
Gives me this error:
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
ImportError: libstdc++.so.6: cannot open shared object file: No such file or directory
Railway Side On my Railway app, it works perfectly with: Build: pipenv install Start: pipenv run ... The Problem When I installed this Python library: https://pypi.org/project/libfaketime, the deployment broke. It basically throws the same error as if I were not to use steam-run on my local machine. I assume this library is not very compatible with nix filesystem. Now I thought of using steam-run on Railway but I don't know how. Would appreciate any help. Thanks in advance!
Solution:
you would likely have a much easier time building your project with a Dockerfile instead of nixpacks
Jump to solution
13 Replies
Percy
Percy8mo ago
Project ID: N/A
Nie
NieOP8mo ago
N/A Btw, that error comes from the FIrestore library.
Nie
NieOP8mo ago
No description
Nie
NieOP8mo ago
It was working fine before. It only became like that when I installed libfaketime
Solution
Brody
Brody8mo ago
you would likely have a much easier time building your project with a Dockerfile instead of nixpacks
Nie
NieOP8mo ago
I see I have 0 experience with Docker Is there a way to fix this without it?
Brody
Brody8mo ago
you would have to figure out all the nix packages your app will need to run and have nixpacks install them
Nie
NieOP8mo ago
I know how to write nix configurations. Can I use it on Railway being its based on nix?
Brody
Brody8mo ago
you mean flakes?
Nie
NieOP8mo ago
yes
Brody
Brody8mo ago
that would not yet be supported, but if you know how to do something that it would only take you a few minutes to get accustomed with a Dockerfile, a Dockerfile is essentially just a list of commands to setup and run your app
Nie
NieOP8mo ago
I see. I'll try to learn it. Thanks for the help! Anyways, may I know the reason why the error occurs? Is it just the library messing up the system?
Brody
Brody8mo ago
missing system library, yeah
Want results from more Discord servers?
Add your server