Skip to content

Error: Command failed with exit code 13 #935

Closed

Description

@cstffx

OS: Ubuntu 16.04

Steps:

yarn global add prisma2

git clone https://github.com/prisma/prisma-examples.git
cd prisma-example/javascript/graphql
yarn

And get

Error: Error: Command failed with exit code 13 (EACCES): /home/user/prisma-examples/javascript/graphql/node_modules/prisma2/query-engine-linux-glibc-libssl1.1.0 cli --dmmf
spawn /home/user/prisma-examples/javascript/graphql/node_modules/prisma2/query-engine-linux-glibc-libssl1.1.0 EACCES
error Command failed with exit code 1

Activity

  1. pantharshit00 commented on Nov 14, 2019

    @pantharshit00
    Contributor

    I am unable to reproduce this.

    Also, I noticed something weird that you are not getting the right binary for ubuntu 16.04 that we ship. In the screenshot below, the binary for ubuntu 16.04 is named query-engine-linux-glibc-libssl1.0.2-ubuntu1604 but your binary is named query-engine-linux-glibc-libssl1.1.0

    image

    Can you please paste the output of lsb_release -a, openssl version and uname -a here?

  2. added
    bug/0-unknown
    kind/bug
    on Nov 14, 2019
  3. cstffx commented on Nov 14, 2019

    @cstffx
    Author

    Hi,

    lsb_release -a
    Distributor ID: Ubuntu
    Description: Ubuntu 16.04.6 LTS
    Release: 16.04
    Codename: xenial

    openssl version
    OpenSSL 1.1.0h 27 Mar 2018 (Library: OpenSSL 1.1.1a 20 Nov 2018)

    uname -a
    Linux desarrollo 4.4.0-157-generic #185-Ubuntu SMP Tue Jul 23 09:17:01 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

  4. pantharshit00 commented on Nov 15, 2019

    @pantharshit00
    Contributor

    Interesting, you have openssl version 1.1 while you are on Ubuntu 16.04 which I think should have openssl 1.0.1

    Are you using the desktop version or a server? Also, I think this would probably be fixed by prisma/prisma-engines#37 #928

  5. cstffx commented on Nov 18, 2019

    @cstffx
    Author

    I'm using the desktop version.

  6. pantharshit00 commented on Nov 19, 2019

    @pantharshit00
    Contributor

    Well, can you please try to install this with npm?

    sudo npm install -g --unsafe-perm prisma2
    
  7. cstffx commented on Nov 21, 2019

    @cstffx
    Author

    I get the next:

    /home/user/node/bin/prisma2 -> /home/user/node/lib/node_modules/prisma2/build/index.js

    [email protected] install /home/user/node/lib/node_modules/prisma2
    node download-build/index.js || echo ""

    Downloading linux-glibc-libssl1.1.0 binary for query-engine and migration-engine [ ] 0%

    Then the process fail with

    request to https://s3-eu-west-1.amazonaws.com/prisma-native/master/b72fd0a786adc77ba6c61d0a9637ff0371e433b0/linux-glibc-libssl1.1.0/migration-engine.gz failed, reason: connect ETIMEDOUT 52.218.52.154:443'

    I am accessing the internet through a proxy, however I have no problems installing other packages with npm and yarn. I can also download this package using the browser through the same proxy. I am investigating other causes and considering upgrading to ubuntu 18.04

  8. pantharshit00 commented on Nov 22, 2019

    @pantharshit00
    Contributor

    Hi @cstffx

    We host our binaries in amazon s3. Our CLI downloads it in postinstall scripts. Can you please make sure that S3 is not blocked by your proxy?

  9. aleccool213 commented on Dec 17, 2019

    @aleccool213

    @pantharshit00 Why is --unsafe-perm necessary?

  10. pantharshit00 commented on Dec 18, 2019

    @pantharshit00
    Contributor

    It is not necessary anymore after #944 is fixed(it is in alpha now)

    Previously unsafe perm was necessary as it would overcome a security feature of npm if you run npm as root on Linux(which is a bad idea anyways). So it wouldn't let our script download the prisma binary. So to overcome this, either you need to use --unsafe-perm or execute npm as a non-root user.

    https://docs.npmjs.com/misc/config#unsafe-perm

    Its usage is common for packages that install a binary(for example electron: https://github.com/electron/electron/blob/8a4c76d6558cffa53400e54317f0f9b1da22f7ef/docs/tutorial/installation.md#troubleshooting) but we have figured out a way to download the binary on the first run instead if our postinstall fails for some reason.

  11. divyenduz commented on Jan 9, 2020

    @divyenduz

    @aleccool213 After #944, is this issue still relevant for you?

  12. aleccool213 commented on Jan 9, 2020

    @aleccool213

    @divyenduz All good 👍

  13. divyenduz commented on Jan 9, 2020

    @divyenduz

    Thank you, closing this one then 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug/0-unknownkind/bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions