1. Tired of not being able to see links? Want to chat with other members? Need help?

[Ubuntu] - Permission denied when compiling C++

Discussion in 'Help & Support' started by Sentinel, Apr 13, 2018.

  1. Sentinel

    Sentinel Liquid Swords

    Joined:
    Oct 18, 2016
    Messages:
    1,182
    Likes Received:
    610
    I need to install a NPM dependency that is using C++ bindings for Node
    After some research, it seemed like the permission got denied was because my storage was mounted with noexec flag, but after remounting them without the flag it sadly didn't fix the error.

    Code:
    Exit code: 1
    Command: sh
    Arguments: -c node-gyp rebuild
    Directory: /home/sentinel/Git/Titan/node_modules/pcre2
    Output:
    gyp info it worked if it ends with ok
    gyp info using [email protected]
    gyp info using [email protected] | linux | x64
    gyp info spawn /usr/bin/python2
    gyp info spawn args [ '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
    gyp info spawn args   'binding.gyp',
    gyp info spawn args   '-f',
    gyp info spawn args   'make',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/sentinel/Git/Titan/node_modules/pcre2/build/config.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
    gyp info spawn args   '-I',
    gyp info spawn args   '/home/sentinel/.node-gyp/9.11.1/include/node/common.gypi',
    gyp info spawn args   '-Dlibrary=shared_library',
    gyp info spawn args   '-Dvisibility=default',
    gyp info spawn args   '-Dnode_root_dir=/home/sentinel/.node-gyp/9.11.1',
    gyp info spawn args   '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
    gyp info spawn args   '-Dnode_lib_file=/home/sentinel/.node-gyp/9.11.1/<(target_arch)/node.lib',
    gyp info spawn args   '-Dmodule_root_dir=/home/sentinel/Git/Titan/node_modules/pcre2',
    gyp info spawn args   '-Dnode_engine=v8',
    gyp info spawn args   '--depth=.',
    gyp info spawn args   '--no-parallel',
    gyp info spawn args   '--generator-output',
    gyp info spawn args   'build',
    gyp info spawn args   '-Goutput_dir=.' ]
    gyp info spawn make
    gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
    make: Entering directory '/home/sentinel/Git/Titan/node_modules/pcre2/build'
      ACTION Building PCRE2 library... .
    /bin/sh: 1: eval: ./compile: Permission denied
    pcre2.target.mk:13: recipe for target '.' failed
    make: *** [.] Error 126
    make: Leaving directory '/home/sentinel/Git/Titan/node_modules/pcre2/build'
    gyp ERR! build error
    gyp ERR! stack Error: `make` failed with exit code: 2
    gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
    gyp ERR! stack     at ChildProcess.emit (events.js:180:13)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
    gyp ERR! System Linux 4.13.0-38-generic
    gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"rebuild\"
    gyp ERR! cwd /home/sentinel/Git/Titan/node_modules/pcre2
    gyp ERR! node -v v9.11.1
    gyp ERR! node-gyp -v v3.6.2
    
    Code:
    [email protected]:~/Downloads/node-pcre2-master$ ./compile
    ./compile: 7: ./compile: ./configure: Permission denied
    gmake  all-am
    gmake[1]: Entering directory '/home/sentinel/Downloads/node-pcre2-master/deps/pcre2'
    
     
  2. Ecko

    Ecko 23:37 [autobots] -!- eckostylez [[email protected]]

    Joined:
    Nov 25, 2012
    Messages:
    1,234
    Likes Received:
    896
    You have proper privileges to run configure?
     
  3. Sentinel

    Sentinel Liquid Swords

    Joined:
    Oct 18, 2016
    Messages:
    1,182
    Likes Received:
    610
    Yeah, I've tried using root/sudo aswell and run chmod +x filename
     
  4. Ecko

    Ecko 23:37 [autobots] -!- eckostylez [[email protected]]

    Joined:
    Nov 25, 2012
    Messages:
    1,234
    Likes Received:
    896
    Give me stat output of compile
     
  5. Sentinel

    Sentinel Liquid Swords

    Joined:
    Oct 18, 2016
    Messages:
    1,182
    Likes Received:
    610
    Code:
      File: ./compile
      Size: 249           Blocks: 24         IO Block: 4096   regular file
    Device: 32h/50d   Inode: 20060935    Links: 1
    Access: (0775/-rwxrwxr-x)  Uid: ( 1000/sentinel)   Gid: ( 1000/sentinel)
    Access: 2018-04-14 03:41:38.690035109 +0200
    Modify: 2017-07-31 11:48:54.000000000 +0200
    Change: 2018-04-14 03:41:27.161995440 +0200
     Birth: -
    
     
  6. Ecko

    Ecko 23:37 [autobots] -!- eckostylez [[email protected]]

    Joined:
    Nov 25, 2012
    Messages:
    1,234
    Likes Received:
    896
    And stat of configure?
     
  7. Sentinel

    Sentinel Liquid Swords

    Joined:
    Oct 18, 2016
    Messages:
    1,182
    Likes Received:
    610
    My bad
    Code:
      File: deps/pcre2/configure
      Size: 542062       Blocks: 1080       IO Block: 4096   regular file
    Device: 32h/50d   Inode: 21629377    Links: 1
    Access: (0664/-rw-rw-r--)  Uid: ( 1000/sentinel)   Gid: ( 1000/sentinel)
    Access: 2018-04-14 03:56:33.840006235 +0200
    Modify: 2017-07-31 11:48:54.000000000 +0200
    Change: 2018-04-14 03:41:04.873918708 +0200
     Birth: -
    
     
     
  8. Ecko

    Ecko 23:37 [autobots] -!- eckostylez [[email protected]]

    Joined:
    Nov 25, 2012
    Messages:
    1,234
    Likes Received:
    896
    Well there's your problem lol
     
  9. TesoMayn

    TesoMayn Boredom, it vexes me.

    Joined:
    Oct 30, 2011
    Messages:
    1,216
    Likes Received:
    836
    644 on configure lmaooo


    woota fookin idiot
     
    Muffinss likes this.
  10. Sentinel

    Sentinel Liquid Swords

    Joined:
    Oct 18, 2016
    Messages:
    1,182
    Likes Received:
    610
    I chmodded it 3-4 times lol
    Ty anyway
     
  11. Ecko

    Ecko 23:37 [autobots] -!- eckostylez [[email protected]]

    Joined:
    Nov 25, 2012
    Messages:
    1,234
    Likes Received:
    896
    Modify: 2017-07-31 11:48:54.000000000 +0200

    ya didn't
     

Share This Page

Loading...