How to install linode-cli in 2021?

OS: ElementaryOS (based on Ubuntu 18.04.4)

After reading the installation process:

https://www.linode.com/docs/guides/linode-cli/

pip3 install linode-cli --upgrade

linode-cli still not working.

Command 'linode-cli' not found, but can be installed with:

sudo snap install linode-cli

So I tried to install using snap, it was prompted to configure the personal token and other information about my account.

This tool defaults to web-based authentication, however no known-working browsers were found.

Try it anyway? [y/N]:

After configuring all information that was asked, I tried to run the following command:

linode-cli --version

The process to configure restart and I need to complete it all over again.

This tool defaults to web-based authentication, however no known-working browsers were found.

Try it anyway? [y/N]: 

Same problem with this one

pip install linode-cli

Compiled from source

git clone git@github.com:linode/linode-cli.git
cd linode-cli
make install

If I run

linode-cli --version

Same message

This tool defaults to web-based authentication, however no known-working browsers were found.

Try it anyway? [y/N]: y

without sudo

Press enter to continue.  This will open a browser and proceed with authentication.
Traceback (most recent call last):
File "/snap/linode-cli/53/bin/linode-cli", line 5, in <module>
from linodecli import main
File "/snap/linode-cli/53/lib/python3.6/site-packages/linodecli/__init__.py", line 29, in <module>
cli = CLI(VERSION, BASE_URL, skip_config=('--skip-config' in argv or '--help' in argv))
File "/snap/linode-cli/53/lib/python3.6/site-packages/linodecli/cli.py", line 40, in __init__
self.config = CLIConfig(self.base_url, skip_config=skip_config)
File "/snap/linode-cli/53/lib/python3.6/site-packages/linodecli/configuration.py", line 83, in __init__
self.configure()
File "/snap/linode-cli/53/lib/python3.6/site-packages/linodecli/configuration.py", line 469, in configure
username, config['token'] = self._get_token_web()
File "/snap/linode-cli/53/lib/python3.6/site-packages/linodecli/configuration.py", line 321, in _get_token_web
temp_token = self._handle_oauth_callback()
File "/snap/linode-cli/53/lib/python3.6/site-packages/linodecli/configuration.py", line 387, in _handle_oauth_callback
serv = server.HTTPServer(("localhost",0), Handler)
File "/snap/linode-cli/53/usr/lib/python3.6/socketserver.py", line 457, in __init__
self.server_activate()
File "/snap/linode-cli/53/usr/lib/python3.6/socketserver.py", line 479, in server_activate
self.socket.listen(self.request_queue_size)
PermissionError: [Errno 1] Operation not permitted

with sudo same error above

1 Reply

OK, I don't know what I did, but it's working now.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct