How to run apt install on railway from user interface

i had a build fail installing a library i python and i have to run this command to fix it : apt install build-essential python3-dev libgmp3-dev how can i do this
24 Replies
Percy
Percy13mo ago
Project ID: 26aabaf6-6d1e-4e3f-9d50-42ff0dfb7486
Pythonic Shit
Pythonic Shit13mo ago
26aabaf6-6d1e-4e3f-9d50-42ff0dfb7486
Brody
Brody13mo ago
it's not done through the user interface, it's done through a nixpacks.toml config file https://nixpacks.com/docs/guides/configuring-builds#install-additional-packages
Pythonic Shit
Pythonic Shit13mo ago
i have done this it is still giving me errors such as gmp.h not found and so on
Brody
Brody13mo ago
show me the nixpacks.toml file you have come up with please?
Pythonic Shit
Pythonic Shit13mo ago
[phases.setup] aptPkgs = ["...", "build-essential python3-dev libgmp3-dev","gcc","libgmp-dev"] this is the content
Brody
Brody13mo ago
that would not be the correct syntax, please reference the docs page I have sent
Pythonic Shit
Pythonic Shit13mo ago
look
Pythonic Shit
Pythonic Shit13mo ago
No description
Pythonic Shit
Pythonic Shit13mo ago
it is installing them but gmp.h not found when i try to download the library fastecdsa
Brody
Brody13mo ago
it's not the correct syntax, I'm not saying that fixing the syntax will fix the issues, I'm just stating a fact
Pythonic Shit
Pythonic Shit13mo ago
what's the correct syntax then? cuz i have no idea tbh i read again the page u sent me
jeremy
jeremy13mo ago
you are trying to install build-essential python3-dev libgmp3-dev, that needs commas between each of them
Pythonic Shit
Pythonic Shit13mo ago
imma try to deploy and see it's still the same it doesn't find gmp.h
src/curve.h:4:10: fatal error: gmp.h: No such file or directory

#11 22.44 4 | #include "gmp.h"

#11 22.44 | ^~~~~~~

#11 22.44 compilation terminated.
src/curve.h:4:10: fatal error: gmp.h: No such file or directory

#11 22.44 4 | #include "gmp.h"

#11 22.44 | ^~~~~~~

#11 22.44 compilation terminated.
Brody
Brody13mo ago
what apt package provides gmp.h
Pythonic Shit
Pythonic Shit13mo ago
libgmp3-dev provide gmp.H
Brody
Brody13mo ago
looks like you may have to move to a Dockerfile based build
Pythonic Shit
Pythonic Shit13mo ago
Can u provide more informations please?
Brody
Brody13mo ago
dockerfiles aren't specific to railway in any way, but if you provide your repo I can see about helping you create a dockerfile
Pythonic Shit
Pythonic Shit13mo ago
It is a private repo and i dont own full access to it so i can't really share it But i can take a screenshot i suppsoe
Brody
Brody13mo ago
sorry that wouldn't be sufficient, but there are tons of great guides out there on how to write a dockerfile for python apps, all you need to do is have a Dockerfile at the root of your project and railway will use it
Pythonic Shit
Pythonic Shit13mo ago
What if I can download manually gmp.h ? Wouldn't that be enough?
Brody
Brody13mo ago
not really how it works, and writing a dockerfile would be far easier please research how to write a dockerfile
Pythonic Shit
Pythonic Shit13mo ago
Thank you i will look it up
Want results from more Discord servers?
Add your server