Build on Ubuntu Command OS

Hello, Expo Team.

I build the apk and ios on my windows 10 OS.
It works well.

Then when I build on Ubuntu 16.04 command OS(not UI os), it fails.
Is it possible?
If yes, how to build?



I’ve moved your question to the Expo-CLI/Build Service forum, since it’s a question about the Expo CLI (and even better, you’re trying to use the build service!) :slight_smile:

This should work fine on Ubuntu. I have done it many times myself.

I would not do this as root. Rather do it as a normal user.

It seems strange to have your project in /var/www/cms. That looks like it might be a bunch of HTML etc. for a website, rather than an Expo project. Is your Expo project really in /var/www/cms?

There is no “Set” command on Linux. The closest equivalent in bash is export, but the recommended way to enable debugging when running expo commands is like this:

EXPO_DEBUG=true expo build:android

So I suggest you move your project to somewhere that a normal, non-root user can access it and make sure to chown all the files in the project to be owned by that user. e.g.:

sudo chown -R youruser:youruser /path/to/your/project

Then try running expo build:android as that normal user and see what happens.

If you still run into problems, run expo diagnostics from project directory as a normal user and paste the output into a comment here.

1 Like

Thanks for your reply

Result expo diagnostics
root@vultr:/var/www/cms# expo diagnostics

Expo CLI 3.15.5 environment info:
OS: Linux 4.15 Ubuntu 18.04.4 LTS (Bionic Beaver)
Shell: 4.4.20 - /bin/bash
Node: 10.19.0 - /usr/bin/node
npm: 6.13.4 - /usr/bin/npm
expo: ~36.0.0 => 36.0.2
react: ~16.9.0 => 16.9.0
react-native: => 0.61.4
expo-cli: 3.15.5

It works well on my windows 10 system.
Then I upload the project to Ubuntu VPS server and run build the project
It shows issue like image

Also can you tell me minium spec of OS?
Current server has 1GB Ram.

Kind Regards


I really suggest you do this as a normal user instead of root.

According to the diagnostics you’re on Ubuntu 18.04 which is the latest LTS version. I’ve done this without problems on Ubuntu 14.04.

1 Like


When I run the project which has 2GB ram, it works fine.
Then takes much time to build android…

Hello, wodin

I have one question now.
how to set the EXPO_APPLE_PASSOWRD as environment variable on ubuntu.

I run "expo build:ios --apple-id "

Then shows below image

I don’t want to put the password manually

Here’s an article that explains environment variables on Ubuntu. See in particular the part about “persistent environment variables”.

Hello, wodin

Thanks for your help!
I have one problem again when build ios
The issue is that my apple id doesn’t exist on database
But I can login on browser

What’s the problem?
Also how can I run build the ios with one command line

Kind Regards

I believe it’s asking for an Expo account. Try running expo login before running expo build:ios.

Hello, wodin
Thanks for your help and reply

I’m faced one new issue.
I want to build the ios with one command line but can’t find the options
Details are on below image.

I run "expo build:ios --apple-id " but get like below image

How to do this with one command line without any input?

Kind Regards

Hi. I haven’t done it myself, but looking at the help output it seems you need to provide the relevant options on the command line and the necessary passwords via environment variables:

$ expo build:ios --help

  Usage: build:ios|bi [options] [project-dir]

  Build a standalone IPA for your project, signed and ready for submission to the Apple App Store.


    -c, --clear-credentials                         Clear all credentials stored on Expo servers.
    --clear-dist-cert                               Remove Distribution Certificate stored on Expo servers.
    --clear-push-key                                Remove Push Notifications Key stored on Expo servers.
    --clear-push-cert                               Remove Push Notifications Certificate stored on Expo servers. Use of Push Notifications Certificates is deprecated.
    --clear-provisioning-profile                    Remove Provisioning Profile stored on Expo servers.
    -r --revoke-credentials                         Revoke credentials on, select appropriate using --clear-* options.
    --apple-id <login>                              Apple ID username (please also set the Apple ID password as EXPO_APPLE_PASSWORD environment variable).
    -t --type <build>                               Type of build: [archive|simulator]. (default: archive)
    --release-channel <channel-name>                Pull from specified release channel. (default: default)
    --no-publish                                    Disable automatic publishing before building.
    --no-wait                                       Exit immediately after scheduling build.
    --team-id <apple-teamId>                        Apple Team ID.
    --dist-p12-path <dist.p12>                      Path to your Distribution Certificate P12 (set password as EXPO_IOS_DIST_P12_PASSWORD environment variable).
    --push-id <push-id>                             Push Key ID (ex: 123AB4C56D).
    --push-p8-path <push.p8>                        Path to your Push Key .p8 file.
    --provisioning-profile-path <.mobileprovision>  Path to your Provisioning Profile.
    --public-url <url>                              The URL of an externally hosted manifest (for self-hosted apps).
    --skip-credentials-check                        Skip checking credentials.
    --config [file]                                 Specify a path to app.json
    -h, --help                                      output usage information


I think the following might also be helpful:

and maybe

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.