Strange. Have you tried reinstalling the cli? I just installed it to see if i got an error too. I never had it installed before. It worked first go. It did prompt me that i needed at least php 7.1 when installed the CLI. Once i did that, installing the CLI worked.
Hmmm. Im running out of ideas. All i can suggest is uninstalling the CLI, quitting terminal, and reinstalling it again, and making sure composer is up to date Im on a mac and it works fine. I noticed your on Ubuntu. Perhaps do a full system update and reboot.
Do you use the CLI for anything else? If your only using it to install when you start project, you could make an alias in bash to grab it via Git. At least saves you some typing (you can also do this on a Mac).
Another way would be to add it to your NPM scripts if you happen to be using NPM for stuff.