Unable to install on Ubuntu 18.04
rishispeets opened this issue · 9 comments
Problem
Installing with the following command throws an error on my Ubuntu 18.04 installation. Unfortunately it's a catch all error message. Any pointers on where to look for a fix?
Command
sudo bash -c "git clone https://github.com/ProtonVPN/protonvpn-cli.git && ./protonvpn-cli/protonvpn-cli.sh --install"
Error
Cloning into 'protonvpn-cli'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 444 (delta 0), reused 4 (delta 0), pack-reused 440
Receiving objects: 100% (444/444), 101.06 KiB | 184.00 KiB/s, done.
Resolving deltas: 100% (266/266), done.
[!] Error: There was an error in installing protonvpn-cli.
Steps undertaken to fix
- Remove
/usr/local/bin/protonvpn-cli
and/usr/bin/pvpn
. - Manually check dependencies contained in installation script.
- Update dependencies.
I can't reproduce this issue. I just tested it on a local machine. Any ideas why this happened?
Unfortunately not. I'm also not really familiar with bash scripting. It would seem like my error should be preceded by some other error. I tried running the script with -x
to get additional debugging output but that yields nothing.
Looking at the script, I see there's an error_counter
. In some places, like the install_cli
function, it increments on an error without throwing an additional error message. Should there be an error message accompanying the increment? Or are they silently caught somewhere?
I'll look into how can I add some additional logging output with bash. Any thoughts would of course be appreciated :).
I encountered by chance the same error after a fresh install of Ubuntu 18.10, and I think I have a fix for this: the code
cli="$(cd "$(dirname "$0")" && pwd -P)/$0"
should be replaced by
cli="$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0")"
in the function install_cli()
of protonvpn-cli.sh
.
Alternatively, without changing the code, you can insert a cd protonvpn-cli
in your command above:
sudo bash -c "git clone https://github.com/ProtonVPN/protonvpn-cli.git && cd protonvpn-cli && ./protonvpn-cli.sh --install"
This should work.
Great! That did the trick. Thanks a lot! 👍
@Tamaranch could you submit a pull request with the fix?
Done… probably in a bad way at first. I hope it's correct now.
@Tamaranch can you close this issue since it has been fixed by e6cf905?
@xilopaint I think I can't close it, since I have not opened it. Perhaps @rishispeets ?
Fixed!