[glibc] apt-get failing error code 1
Hi everyone, Im getting the error below when trying to install gcc libpq-dev. I have my env settup properly for Nixpacks as I attached in the image. why would this error occur?
36 Replies
Project ID:
N/A
full build logs please https://bookmarklets.up.railway.app/log-downloader/
I cant get that to work for some reason, wont drag to my bookmarks, but I can copy and paste the full build log
add a railway.toml file to your project with this in it
I’ll try it out when I get home from work and I’ll let you know thank you
That works thanks!
brody gody
One thing tho, I notice that when I either redeploy or push a new change to github, its not saying the libpq-dev package is missing. It worked the first time tho. Is there a way I can purge cache or something? I have a feeling thats what causing it
`File "/opt/venv/lib/python3.11/site-packages/psycopg/pq/__init__.py", line 114, in <module>
import_from_libpq()
File "/opt/venv/lib/python3.11/site-packages/psycopg/pq/__init__.py", line 106, in import_from_libpq
raise ImportError(
ImportError: no pq wrapper available.
Attempts made:
- couldn't import psycopg 'c' implementation: No module named 'psycopg_c'
- couldn't import psycopg 'binary' implementation: No module named 'psycopg_binary'
- couldn't import psycopg 'python' implementation: libpq library not found
if it is a cache issue set a service variable
NIXPACKS_NO_CACHE
to 1
What does your
requirements.txt
look like? Curious what about the missing postgres package
Thats requirements.txt
hmm i tried that still getting same error
This is the full logs if its helpful
replace
psycopg
with psycopg-binary
🙂I did try that, but I guess the package im using relies on psycopg 1 not 2 so its causing some sorta problem
what browser are you using?
Chrome
do you have the bookmarks bar set to always display?
Yes
oh
i just read that
brain dead
guest mode smh
also, you dont have the bookmarks bar set to always display
There we go
build logs also please
do you have something set in your build command in the service settings?
Thats my my railway.toml
remove the buildCommand line
okay ill try it
Still same error. The weird part is it worked perfect the first deploy. I had gcc and libpq-dev installed with the Nixpacks, and pyscop in the requirements. As soon as i redeployed it croaked
first deploy, when?
Like I basically started a new project by selecting my repo
That first deploy worked no psycopg issues
Then I redeployed the same code and it died
wait a minute
i just added both psycop-binary and psycop regular and its working now
sweet, problem solved
Thanks for all the help
Im pretty curious as to why that helped it
My theory is that theres an installation issue with libpq-dev thats still happening, and the binary version fills in whatever is missing from that, and then the regular psycop package is whats required by my python code
I believe the purpse of the binary package is to avoid having to use seperatly install the binaries. But for now, im just gonna leave it and not screw with it lmfao
thats exactly what i was thinking
Because my first deploy it was able to detect the binaries from install the nixpacks env var that I set
I assumed that there was some sort of package caching issue but I set that cache env var to 1 like you said earlier but it didnt do anything
I'll have to look into it more, very strange but I feel like it might be a railway bug. I just started using railway today tho so I have no idea. Could be me
i wouldnt say bug, just something that nixpacks should account for, your app isnt doing anything crazy advanced after all
Ya its nothing wild just a server i built for open ai function calling, code interpreter basically
But I appreciate your help, thank you
no problem!