0

I am trying to implement image filters with react-native-image-filter-kit. I follow the implementation steps for with react-native >=0.64.0 from here .

I use EAS build. When i try to build a new apk i get the error below:

/home/expo/Android/Sdk/build-tools/29.0.2/llvm-rs-cc: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

In the answer here i see that i need to do the following:

or 32-bit binaries : sudo apt-get install libncurses5:i386

for 64-bit binaries : sudo apt-get install libncurses5

Also install the collection of libraries by using this command,

sudo apt-get install ia32-libs

How can i do that with a managed EAS flow?

yannisdev
  • 11
  • 2

1 Answers1

-1

EAS incudes scope to run script which will pre-install items that are needed for the build to complete.

So for Expo you do that by adding the 'eas-build...' line to your package.json file

"scripts": {
    "start": "expo start --dev-client",
    "android": "expo run:android",
    "eas-build-pre-install": "./pre-install",
    "ios": "expo run:ios",
    "web": "expo start --web"

You then add the following code in the root of the project in a file called 'pre-install':

#!/bin/bash

# This is a file called "pre-install" in the root of the project

if [[ "$EAS_BUILD_PLATFORM" == "android" ]]; then
  echo "Run commands for Android builds here"
  sudo apt-get --quiet update --yes

  sudo apt-get --quiet install --yes \
      libncurses5 \

elif [[ "$EAS_BUILD_PLATFORM" == "ios" ]]; then
  echo "Run commands for iOS builds here"
fi

And that's it, the project should be buildable on Android again.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Tom Hopkins
  • 11
  • 1
  • 3