Closed longview closed 1 year ago
Well, fixed it myself, but not sure what the root cause was.
I ran a hexdump -C on the yt.sh script (as installed by the official RPM), and the first three bytes were: ef bb bf before the #!/bin/sh
No idea how those got there (the current git branch doesn't seem to have them).
This was obviously throwing off the OS, but bash would just print an error message and continue.
Tried on Ubuntu 22.04, same feel. Seems that yt.sh file got UTF-8 BOM, which is not welcome in mainstream distros. Interesting that TinyCore Linux supports such shell scripts.
As a temporary workaround, solved re-creating the file in nano
text editor initially in DOS format (Ctrl+O, Alt+D), then in UNIX (again, Ctrl+O, Alt+D).
Probably 1281294 should fix this permanently. Some later I'll try to build a package and verify.
Upd: not working, as now line endings became CrLf.
$ /usr/share/webone/yt.sh
bash: /usr/share/webone/yt.sh: /bin/sh^M: неверный интерпретатор: Нет такого файла или каталога
(invalid interpreter: no such file or directory)
New update coming soon.
In 1281294 I've broken line endings, so now fixed this mistake in d66f7de.
A test installation of deb package have working Youtube download feature. Probably rpm should be correct too.
Correct deb/rpm packages will be published soon. I hope, in this year. :)
Using the youtube-converter script fails for me, with the error message being:
On-fly converter error: An error occurred trying to start process '/usr/share/webone/yt.sh' with working directory '/'. Exec format error
OS is RHEL 9.0, ImageMagick conversion does work fine, and calling the yt.sh script directly with the YT link works. SELinux does not report any issues related to WebOne either.
The error message suggest the DotNet library doesn't realize yt.sh is a shell script, and is trying to execute it as a binary application, which fails.