By Jason
I am trying to deploy our product to the new app platform, but our node-js app requires some native dependencies (graphics magic, cario, etc…).
The issue is that the node-js environment slug does not allow running apt-get install, or sudo apt-get install. I’m not sure if it’s related to the fact that you are not including the heroku apt buildpack, https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-apt
apt-get install receives: Reading package lists… E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied
sudo apt-get install receives: sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the ‘nosuid’ option set or an NFS file system without root privileges?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I don’t have a public release date on it yet, but the team is working on this.
For now, you can deploy via dockerfile where apt install will work.
Are there any news about this request? I’m getting the same error when I try to install linux packages using apt-get install … Thanks
Hi there,
Quick update here, the App Platform now supports this via Aptfile:
https://docs.digitalocean.com/products/app-platform/reference/buildpacks/aptfile/
App Platform looks for a file named Aptfile (no file extension) to detect an application requiring system packages. If this file is detected, the heroku-buildpack-apt buildpack is used to install any packages listed in the Aptfile during the build process.
The following example Aptfile declares three system packages to install:
libpq-dev
imagemagick
curl
This example installs:
libpq-dev: A library for PostgreSQL applications.imagemagick: A command-line tool for image processing.curl: A command line tool for making HTTP requests.Another option here remains the usage of a Dockerfile which gives you more flexibility:
https://docs.digitalocean.com/products/app-platform/reference/dockerfile/
Hope that this helps!
Best,
Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.