Error with fresh Crowdsec install on Debian 11

HI, guys

I installed crowdsec on my debian 11 but I’m not able to enroll the agent. I have this error

Error: unknown command “console” for “cscli”
Run ‘cscli --help’ for usage.
FATA[0000] While executing root command : unknown command “console” for “cscli”

Could you help me ?
Thanks.

You are running an older version of cscli can you run cscli version?

Hi, upload the wrong command.

So There is:

 cscli version
FATA[0000] read '/etc/crowdsec/config/default.yaml' : open /etc/crowdsec/config/default.yaml: no such file or directory
cscli --config /etc/crowdsec/config.yaml version
FATA[0000] parse '/etc/crowdsec/config.yaml' : yaml: unmarshal errors:
  line 1: field common not found in type csconfig.CrowdSec
  line 10: field config_paths not found in type csconfig.CrowdSec
  line 18: field crowdsec_service not found in type csconfig.CrowdSec
  line 23: field cscli not found in type csconfig.CrowdSec
  line 26: field db_config not found in type csconfig.CrowdSec
  line 39: field plugin_config not found in type csconfig.CrowdSec
  line 42: field api not found in type csconfig.CrowdSec
  line 60: cannot unmarshal !!map into bool

And them run which -a cscli

You will find you have two and one is old the other is the new one. You just need to rm the old one and that one will be the one you can’t do cscli version

Hi,

Thanks for your help.

I had two cscli executables:

  1. /usr/local/bin/cscli
  2. usr/bin/cscli

I uninstalled Crowdsec, deleted both executables, and then reinstalled Crowdsec. However, I am still unable to use the cscli command to enroll the agent.

Thanks a lot.

Odd, and you cant run version either? The idea behind my previous comment was to only remove the old binary not reinstall everything.

Do you only have one cscli now?

Could you also provide output of uname -a

Hi, Sorry I didn’t saw your question.

Linux Oden 6.1.0-0.deb11.7-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.20-2~bpo11+1 (2023-04-23) x86_64 GNU/Linux

I have one csli now, /usr/bin/cscli .

Hmm but it seems its old, did you install it from our repos?

HI, don’t remember… I tried several thing but I always follow the guide from the provider… Maybe I use the repo of debian :confused:

If you use the repo of debian there a chance depending on your arch that you get an old version. We always recommend installing from our repositories