How to use apt-get in EAS build hooks
See original GitHub issueI’m trying to install some packages with apt-get
as mentioned in the Expo docs.
I’ve added the script "eas-build-post-install": "../../scripts/ci/get-translations.sh"
in my package.json (using ../../
as my app is in a monorepo) and the get-translations.sh
file is being run successfully.
It contains the following lines:
sudo apt-get -y update
sudo apt-get -yq install python-pip
sudo pip install --upgrade pip
sudo pip install transifex-client
The post install script fails with the following output:
[stderr] sudo: apt-get: command not found
[stderr] sudo: apt-get: command not found
[stderr] sudo: pip: command not found
[stderr] sudo: pip: command not found
I also tried running all commands without sudo
and still got ‘command not found’ errors.
Please could you explain how to run apt-get
in the build hooks?
Here’s a build log in case seen by Expo staff: https://expo.io/accounts/festicket/builds/eb30aac4-bf89-4f55-aa60-a7934f100e5a/logs
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Running E2E tests on EAS Build
This guide explains how to run E2E tests with Detox in a bare workflow project. ... Create eas-hooks/eas-build-pre-install.sh that installs the necessary ...
Read more >Build lifecycle hooks
Learn how to use the EAS Build lifecycle hooks with npm to customize your build process.
Read more >Build server infrastructure
Learn about the current build server infrastructure when using EAS. ... use npm hooks to install or update any system dependencies with apt-get...
Read more >EAS Build
EAS Build is a hosted service for building app binaries for your Expo and React Native projects. It makes building your apps for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
there is a lot of options
uname -S
command -v apt-get
before calling apt-getFor now I’m using a custom env variable called
EAS__PLATFORM
that I set ineas.json
as I couldn’t see any built-in that would do the same here: https://docs.expo.io/build-reference/variables/#built-in-environment-variables