keybase / keybase-issues

A single repo for managing publicly recognized issues with the keybase client, installer, and website.
900 stars 37 forks source link

Sudo Access Required to Install Keybase on Mavericks #927

Open thomasquinlan opened 10 years ago

thomasquinlan commented 10 years ago

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.

maxtaco commented 10 years ago

Sorry about this, I personally never install anything as sudo. Whether or not you need sudo depends on how you installed node. But you can always provide keybase-installer --prefix=/path/to/foo to install to directory /path/to/foo. If /path/to/foo is a directory your user can write to, then you don't need sudo

briandcosta commented 10 years ago

I found this to be true too...using sudo to install. I just installed Node using the default...would that not be the preferred method?

I'm also wondering what the "gpg: WARNING: unsafe enclosing directory ownership on configuration file" means as I got the same message on install.

--Brian

kornelski commented 9 years ago

I've ran into the same problem. I don't like the suggestion to install globally (-g) as it requires giving root privileges.