keybase / keybase/keybase-issues

Sudo Access Required to Install Keybase on Mavericks

Open
#927 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
899
Forks
40
PR merge metrics
No merged PRs in 30d

Description

If I try to install keybase on Mavericks at the command line as a regular user, I get this:

C02M705CFD57:~ thomas.quinlan$ npm install -g keybase-installer
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/keybase-installer'
npm ERR! error rolling back keybase-installer@0.1.22 { [Error: EACCES, unlink '/usr/local/lib/node_modules/keybase-installer']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/keybase-installer' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/keybase-installer'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/keybase-installer']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/keybase-installer' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "keybase-installer"
npm ERR! cwd /Users/thomas.quinlan
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/keybase-installer
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/keybase-installer'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/thomas.quinlan/npm-debug.log
npm ERR! not ok code 0

Sudo access gives me this:

C02M705CFD57:~ thomas.quinlan$ sudo npm install -g keybase-installer
Password:
/usr/local/bin/keybase-installer -> /usr/local/lib/node_modules/keybase-installer/bin/main.js
keybase-installer@0.1.22 /usr/local/lib/node_modules/keybase-installer

If I then try "keybase-installer", it also doesn't work without Sudo access:

C02M705CFD57:~ thomas.quinlan$ keybase-installer
info: Made temporary directory: /var/folders/1q/xkxccbjd1713pn98pht7lw8w6zpbnj/T/keybase_install_Ppt46qGRAyi_kk6sdLr2Bg
info: Using keyset version v1
info: Fetching URL https://dist.keybase.io/sig/files/1/index.asc
info: Fetching URL https://dist.keybase.io/pkg/stable
Download /pkg/files/keybase-0.4.14.tgz [=================================================] 100% 0.0s (2399396 bytes total)
info: Fetching URL https://dist.keybase.io/sig/files/1/keybase-0.4.14.tgz.asc
info: verified signature of keybase-0.4.14.tgz against keybase-0.4.14.tgz.asc
info: Running npm install keybase-0.4.14.tgz: this may take a minute, please be patient
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/keybase'
npm ERR! error rolling back keybase@0.4.14 { [Error: EACCES, unlink '/usr/local/lib/node_modules/keybase']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/keybase' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/keybase'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/keybase']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/keybase' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "/var/folders/1q/xkxccbjd1713pn98pht7lw8w6zpbnj/T/keybase_install_Ppt46qGRAyi_kk6sdLr2Bg/keybase-0.4.14.tgz"
npm ERR! cwd /Users/thomas.quinlan
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.14
npm ERR! path /usr/local/lib/node_modules/keybase
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/keybase'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/thomas.quinlan/npm-debug.log
npm ERR! not ok code 0
info: cleaning up tmpdir /var/folders/1q/xkxccbjd1713pn98pht7lw8w6zpbnj/T/keybase_install_Ppt46qGRAyi_kk6sdLr2Bg
error: exit code 3

However, with sudo, it works:

C02M705CFD57:~ thomas.quinlan$ sudo keybase-installer
info: Made temporary directory: /tmp/keybase_install_E24kG6f8Ky-nSnYWb9-cjQ
gpg: WARNING: unsafe enclosing directory ownership on configuration file `/Users/thomas.quinlan/.gnupg/gpg.conf'
gpg: WARNING: unsafe enclosing directory ownership on configuration file`/Users/thomas.quinlan/.gnupg/gpg.conf'
info: Using keyset version v1
info: Fetching URL https://dist.keybase.io/sig/files/1/index.asc
gpg: WARNING: unsafe enclosing directory ownership on configuration file `/Users/thomas.quinlan/.gnupg/gpg.conf'
gpg: WARNING: unsafe enclosing directory ownership on configuration file`/Users/thomas.quinlan/.gnupg/gpg.conf'
info: Fetching URL https://dist.keybase.io/pkg/stable
Download /pkg/files/keybase-0.4.14.tgz [=================================================] 100% 0.0s (2399396 bytes total)
info: Fetching URL https://dist.keybase.io/sig/files/1/keybase-0.4.14.tgz.asc
gpg: WARNING: unsafe enclosing directory ownership on configuration file `/Users/thomas.quinlan/.gnupg/gpg.conf'
gpg: WARNING: unsafe enclosing directory ownership on configuration file`/Users/thomas.quinlan/.gnupg/gpg.conf'
info: verified signature of keybase-0.4.14.tgz against keybase-0.4.14.tgz.asc
# info: Running npm install keybase-0.4.14.tgz: this may take a minute, please be patient

Welcome to keybase.io!

You have successfully installed the command-line client to

====> /usr/local/bin/keybase <=======

Please make sure /usr/local/bin is in your PATH.

If you're new to the service run:

```
$ keybase signup # signup for a new account
$ keybase push # to push your public key to the server
-- or --
$ keybase gen # generate a new key and push it
```

If you already signed up via the Web or another keybase client, try:

```
$ keybase login # establish a session with the server, and pull down keys
```

Once you're configured, you can:

```
$ keybase prove twitter # prove your twitter identity
$ keybase id max # to identify a friend
$ keybase track max # to track them and write a proof to the server
```

And then attempt crypto actions like enc/dec/verify/sign. See `keybase --help` for
more details.

info: cleaning up tmpdir /tmp/keybase_install_E24kG6f8Ky-nSnYWb9-cjQ
C02M705CFD57:~ thomas.quinlan$

After that, tracking max works, meaning I've successfully reinstalled and updated, but only with sudo access.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the keybase-installer command and its npm install steps, reproducing the reported Mavericks behavior as a regular user. Compare the global installation and downloaded keybase package installation paths; done means the installer and resulting keybase command work without sudo.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.