How can I install command-line tools, binaries etc.?
I want to install zlib, fontconfig, freetype, libX11, libXext, libXrender, wkhtmltopdf
How can I do this?
How can I install command-line tools, binaries etc.?
I want to install zlib, fontconfig, freetype, libX11, libXext, libXrender, wkhtmltopdf
How can I do this?
You can simply head to package.json
file and search for the project you want to add at the top, and select appropiate package.
Or well you can use the console as well.
Open the console and type
npm i packageName
and gitch will install the package.
These aren’t node packages
Hello @NoobDoesMC,
we don’t allow root access inside the project container. We are considering adding those packages to the container image so that they will be accessible to everyone Just one question: what is wkhtmltopdf
? Do you need that specific html-to-pdf package, or a similar one would work for you too?
wkhtmltopdf is a dependency of the same-name npm package
I want to use it to turn html into png and serve rendered pngs to the client.
Hey @NoobDoesMC,
I was able to install wkhtmltopdf by downloading a compiled version for Linux AMD64. I moved the binaries to ~/bin which is included in the $PATH of the default shell.
File is almost 40mb, something to keep in mind since these instances only allow us to have 128mb in our home folder (/app, check with $ df -h).
Here are the instructions:
$ cd /tmp
$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
$ tar vxf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
$ mv wkhtmltox/bin/wkhtmltopdf ~/bin/
$ cd
$ wkhtmltopdf --version
wkhtmltopdf 0.12.4 (with patched qt)
$ rm -r /tmp/wkhtmltox /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
$ wkhtmltopdf http://google.com google.pdf
$ curl --upload-file google.pdf https://transfer.sh/google.pdf
https://transfer.sh/agAU3/google.pdf
So what about installing the NPM package and use it from a Node.js application?
Once this is setup, you’ll be able to install the dependency and use it from your app.
I created a very simple Glitch app so you can see it in action, you can remix it from there.
https://wkhtmltopdf-example.glitch.me (edit link)
Good luck, have fun!
And to actually answer your question, this process can be done for the rest of your libraries.
We have access to $ apt-get source
(to download source) and we can compile (make sure to do that in the /tmp
folder), but the process will depend on the package you’re trying to install, so I’ll leave that to you.
Hit me up if you have any questions.