outline-apps icon indicating copy to clipboard operation
outline-apps copied to clipboard

Cannot find shasum

Open htfy96 opened this issue 3 years ago • 7 comments

Describe the bug Launching a server doesn't work on ArchLinux.

To Reproduce

  1. Download latest appimage
  2. Add any server
  3. Click "Connect"
  4. The connection fails with logs saying:
command is running as root but failed:  Error: Command failed: cd "/home/lz"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; trap \"/usr/bin/chattr -R -i /tmp/eGnG05\" EXIT; /usr/bin/chattr -R +i /tmp/eGnG05 && /usr/bin/echo \"[REDACTED]  /tmp/eGnG05/install_linux_service.sh\" | /usr/bin/shasum -a 256 -c && /usr/bin/echo \"[REDACTED]   /tmp/eGnG05/OutlineProxyController\" | /usr/bin/shasum -a 256 -c && /usr/bin/echo \"[REDACTED]   /tmp/eGnG05/outline_proxy_controller.service\" | /usr/bin/shasum -a 256 -c && \"/tmp/eGnG05/install_linux_service.sh\" \"lz\""
/bin/bash: line 1: /usr/bin/shasum: No such file or directory
/usr/bin/echo: write error: Broken pipe

Expected behavior What behavior did you expect?

The server launches successfully.

Client System (please complete the following information):

  • Outline Client Version [e.g. iOS 1.3.1]: latest 1.8.1
  • Your Operating System: [e.g. iOS 14.2, Windows 10]: Arch Linux

Additional context It turns out that ArchLinux installs shasum under:

$ which shasum
/usr/bin/core_perl/shasum

Moreover, it's more canonical to use sha256sum which is included in coreutils instead of relying on shasum, a Perl program for the same requirements.

htfy96 avatar Nov 24 '22 04:11 htfy96

i have the same experience

fruitbang avatar Dec 19 '22 16:12 fruitbang

Hi @htfy96 @fruitbang , thanks for reporting the issue. As an workaround, please check following steps:

  1. download the contents in "https://github.com/Jigsaw-Code/outline-client/tree/linux-v1.8.1/tools/outline_proxy_controller/dist" and cd into the folder
  2. Make sure install_linux_service.sh and OutlineProxyController are executable (chmod +x)
  3. Run sudo ./install_linux_service.sh <your-linux-username>, for example, if you linux username is wanyay, please run sudo ./install_linux_service.sh wanyay
  4. After the installation script runs successfully, please launch Outline and try to connect

Again, sorry about the inconvenience.

jyyi1 avatar Dec 19 '22 22:12 jyyi1

I solved by

PATH="${PATH:+${PATH}:}/usr/bin/core_perl"

https://command-not-found.com/shasum

gustawdaniel avatar Mar 23 '23 05:03 gustawdaniel

Latest appimg 1.13.1 (476278), same problem, Fedora 40 KDE. as a temporary solution for fedora sudo dnf install perl-Digest-SHA

rodin-ia avatar Aug 04 '24 21:08 rodin-ia

Hi there, we now have a CLI version of Outline that should work for most of the Linux distros. Please have a try.

jyyi1 avatar Aug 17 '24 00:08 jyyi1

Hi there, we now have a CLI version of Outline that should work for most of the Linux distros. Please have a try.

I've been using cli version for the last few months and it works perfectum!, thank you.

fruitbang avatar Aug 17 '24 10:08 fruitbang

Ran into a similar issue on Gentoo. Appimage script could not find echo sed or cp under /usr/bin. I had to create symlinks for all three utils. Client app still choked because it required sytemctl, which Gentoo does not have as it uses openrc init system.

Not sure why paths to basic userland utils are being called from hard coded paths.

sysfu avatar Oct 23 '24 22:10 sysfu

Ran into a similar issue on Gentoo. Appimage script could not find echo sed or cp under /usr/bin. I had to create symlinks for all three utils. Client app still choked because it required sytemctl, which Gentoo does not have as it uses openrc init system.

Not sure why paths to basic userland utils are being called from hard coded paths.

Actually we were calling well-known commands without absolute paths before, but our security team instructed us to stop doing that to prevent malicious command injection. We have to comply with this security requirement, unfortunately.

jyyi1 avatar Oct 25 '24 19:10 jyyi1

Ran into a similar issue on Gentoo. Appimage script could not find echo sed or cp under /usr/bin. I had to create symlinks for all three utils. Client app still choked because it required sytemctl, which Gentoo does not have as it uses openrc init system. Not sure why paths to basic userland utils are being called from hard coded paths.

Actually we were calling well-known commands without absolute paths before, but our security team instructed us to stop doing that to prevent malicious command injection. We have to comply with this security requirement, unfortunately.

Ah, interesting and I can see the motivation for that. It's a strike against portability unfortunately. Wondering if a secondary or 'backup' absolute path could be called so that the app isn't broken on distros like Gentoo.

sysfu avatar Oct 26 '24 18:10 sysfu

Ran into a similar issue on Gentoo. Appimage script could not find echo sed or cp under /usr/bin. I had to create symlinks for all three utils. Client app still choked because it required sytemctl, which Gentoo does not have as it uses openrc init system. Not sure why paths to basic userland utils are being called from hard coded paths.

Actually we were calling well-known commands without absolute paths before, but our security team instructed us to stop doing that to prevent malicious command injection. We have to comply with this security requirement, unfortunately.

Ah, interesting and I can see the motivation for that. It's a strike against portability unfortunately. Wondering if a secondary or 'backup' absolute path could be called so that the app isn't broken on distros like Gentoo.

Ah yeah, that's doable. Even better, we are planning to get rid of the "initialization process" in the future for Outline Client Linux. The work is already in progress now.

jyyi1 avatar Oct 30 '24 15:10 jyyi1