Help Installing Linux Packages

I need to run these commands:

sudo apt-get update
sudo apt-get install libharfbuzz0b libfontconfig1 libfreetype6 libgl1-mesa-dev libglu1-mesa

so I can use SkiaSharp for my project. Is there anything else I can do to get these packages, or is there a way to run these commands?

0 Replies


coderjoshdk
TRIAL

a year ago

A docker image is going to be your best bet. Just setup your image to download everything you need for the build and the entry point for the deployment command.


a year ago

while i like dockerfiles more than the next guy, it would be easier for the end user to attempt this with nixpacks, and if that doesnt work then its dockerfile time.


a year ago

so lets attempt it with nixpacks, add this nixpacks.toml file to your project -

[phases.setup]
    aptPkgs = ['...', 'libharfbuzz0b', 'libfontconfig1', 'libfreetype6', 'libgl1-mesa-dev', 'libglu1-mesa']

coderjoshdk
TRIAL

a year ago

Hmmm, actually, I do get what you mean here. Yea, if everything else was already working, just try a simple nixpacks config update.

hehe, I was too focused on the fact that they wrote out the exact command they needed "RUN"


haha oops, I am not used to using config on this project lol my bad


a year ago

it was close, they'd need a -y flag to apt-get install too


hmm, this still did not fix my issue


a year ago

build logs please -


it might not be in the build logs


my project can deploy and parts of it work


a year ago

please send the build logs anyway


just not the part which uses SkiaSharp




a year ago

these are the deploy logs


indeed my bad



a year ago

Yep they are getting installed, but it still doesnt work, was worth a shot but we have to go with joshie's recommendation, you will need to write a Dockerfile


dang


why does it always build with NIX packs and not the docker file?


a year ago

is your Dockerfile named Dockerfile?



a year ago

is it located in the root of your project or the root according to your service settings?



a year ago

build logs please



a year ago

are you able to share your repo?


uh yeah,



this specific branch


a year ago

it is not


ah…..


thanks very much for the help


a year ago

got it working?



a year ago

awsome!


a year ago

please do not close threads