Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find shasum #1488

Open
htfy96 opened this issue Nov 24, 2022 · 11 comments
Open

Cannot find shasum #1488

htfy96 opened this issue Nov 24, 2022 · 11 comments
Assignees
Labels
bug Something is broken, we are tracking it failure/install os/linux

Comments

@htfy96
Copy link

htfy96 commented Nov 24, 2022

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 htfy96 added the bug Something is broken, we are tracking it label Nov 24, 2022
@fruitbang
Copy link

i have the same experience

@jyyi1 jyyi1 self-assigned this Dec 19, 2022
@jyyi1
Copy link
Contributor

jyyi1 commented Dec 19, 2022

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.

@VasiliyMooduckovich
Copy link

In case of ArchLinux here's workaround that helped me - just create a symlink with the right path
sudo ln -s /usr/bin/core_perl/shasum /usr/bin/shasum

ps

dmn this is so silly, i guess this situation is the perfect example why were developed software such as Flatpak, Snap, AppImage and so on, and why there never be as they calls it - "a year of Linux on desktop", that's because of sht like this, i mean how much Linux distros out there? hundreds? And every one of them uses their own path to install packages, so developers can't predicted which distro you will be using to install their software

@gustawdaniel
Copy link

I solved by

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

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

@rodin-ia
Copy link

rodin-ia commented Aug 4, 2024

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

@jyyi1
Copy link
Contributor

jyyi1 commented Aug 17, 2024

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

@fruitbang
Copy link

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.

@sysfu
Copy link

sysfu commented Oct 23, 2024

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.

@jyyi1
Copy link
Contributor

jyyi1 commented Oct 25, 2024

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.

@sysfu
Copy link

sysfu commented Oct 26, 2024

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.

@jyyi1
Copy link
Contributor

jyyi1 commented Oct 30, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is broken, we are tracking it failure/install os/linux
Projects
None yet
Development

No branches or pull requests

8 participants