DistroAV icon indicating copy to clipboard operation
DistroAV copied to clipboard

Install script libndi-get.sh for Linux appears to be out of date

Open Macrobiotic opened this issue 1 year ago • 18 comments

I've been trying to install obs-ndi for Linux, and I got to the step of running libndi-get.sh and it generated an error saying access denied.

After a bit of investigating, I found that the download link for the SDK is no longer valid. NDI now requires a request to be submitted on https://ndi.video/ in order to get access to the SDK download.

The URL that is generated appears to be unique for each user.

Also, the contents of the download is a shell script with an embedded archive. I'm thinking that the instructions will need to be changed in order to work with the changes NDI has made.

Hope this helps.

Macrobiotic avatar Feb 14 '24 02:02 Macrobiotic

A little update.

I managed to manually install libndi by reading libndi-get.sh and manually performing the actions with the new SDK download.

The process is sufficiently different to require me to manually download the SDK and transfer the files to /usr/local/lib/ before running ldconfig.

Macrobiotic avatar Feb 14 '24 02:02 Macrobiotic

Regarding the download, I just checked and this still works fine for me from MacOS command-line (which is still basically just Linux):

% curl -L -o Install_NDI_SDK_v5_Linux.tar.gz https://downloads.ndi.tv/SDK/NDI_SDK_Linux/Install_NDI_SDK_v5_Linux.tar.gz -f --retry 5
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 51.3M  100 51.3M    0     0  27.4M      0  0:00:01  0:00:01 --:--:-- 27.4M

The script has been updated a little bit in the develop branch that is a bit overdue to be merged to master: https://github.com/obs-ndi/obs-ndi/blob/develop/CI/libndi-get.sh

https://github.com/obs-ndi/obs-ndi/pull/960/files#diff-e284f6a0fa73f2e6c8232ca4a078b2cf8454ed71c5097587a5857ec9d955cae8

paulpv avatar Feb 14 '24 18:02 paulpv

That's odd. I just tested it on my Ubuntu 23.10 install and got this instead:

sudo ./libndi-get.sh /tmp /home/localadmin/Downloads % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: Failed to open the file Install_NDI_SDK_v5_Linux.tar.gz: Permission Warning: denied 0 51.3M 0 24606 0 0 32392 0 0:27:41 --:--:-- 0:27:41 32376 curl: (23) Failure writing output to destination

Macrobiotic avatar Feb 15 '24 01:02 Macrobiotic

/tmp /home/localadmin/Downloads

Why does it go from tmp to /home/ ?

RayneYoruka avatar Feb 15 '24 01:02 RayneYoruka

Why does it go from tmp to /home/ ?

I'm not sure. /home/localadmin/Downloads is where I downloaded the shell script to and where I run it from.

Further down the script, it would extract the SDK archive into /tmp before transferring only the lib files into the correct location.

Macrobiotic avatar Feb 15 '24 01:02 Macrobiotic

Thats really odd.. the only that comes to my mind is SeLinux trying to limit to /home/..

Could you verify if its running with sestatus?

I might spin VM later to see if I can figure what is causing this.

Having a list of systems where it can run is good in my opinion

RayneYoruka avatar Feb 15 '24 01:02 RayneYoruka

It looks like neither sestatus or getenforce are installed.

After installing policycoreutils I got this:

sudo sestatus SELinux status: disabled

Macrobiotic avatar Feb 15 '24 02:02 Macrobiotic

Hmm, Ill try today and see what I can find. Ping if you find out anything

RayneYoruka avatar Feb 15 '24 02:02 RayneYoruka

Okie, thanks for looking into it. It's weird indeed.

Macrobiotic avatar Feb 15 '24 02:02 Macrobiotic

I just thought of something that may be relevant.

I've been updating Ubuntu on these machines from at least 22.04 (maybe further back).

It's possible that has something to do with this. In case a fresh install of 23.10 doesn't replicate the issue. I'll try to find a machine I can do a clean install on as well. (Might have space on the Proxmox box for one more VM.)

Macrobiotic avatar Feb 15 '24 02:02 Macrobiotic

I have tested on ubuntu 22.04 and mint 21 if I don't remember wrong.. altho they were clean installs. That might be it, not sure. I've actually never distro upgraded that way

RayneYoruka avatar Feb 15 '24 02:02 RayneYoruka

The only weirdness I remember encountering, is that SSL certs used by apt need to be installed differently in newer versions of Ubuntu (and Debian). The old way is deprecated but still works.

Macrobiotic avatar Feb 15 '24 02:02 Macrobiotic

I did a clean install of ubuntu 23.10,, it's surprisingly buggy (it took me 4 attempts to install without something breaking randomly).

Aside from that using the install script from the dev branch https://github.com/obs-ndi/obs-ndi/blob/develop/CI/libndi-get.sh worked perfectly without any issue. I only had to install curl to use the script. No other issues related

image

As you can see, I had the script on /home/rayne/ and it decided to show /tmp/ /home/rayne after running the script. It didn't change anything and just ran without issue. Weird indeed.

RayneYoruka avatar Feb 18 '24 16:02 RayneYoruka

Hopefully that bugginess gets ironed out in time for 24.04, as I think that's the long term support edition.

I'll hopefully get to try out this approach soon and confirm that it's a successful install for me too.

Macrobiotic avatar Feb 19 '24 12:02 Macrobiotic

Yes, I think it's been a thing since 14.04 that there is a lot of bugs on the distro, not anymore with the LTS versions. I will try on 24.04 as soon as it's realeased to make sure it works without issue x)

RayneYoruka avatar Feb 19 '24 15:02 RayneYoruka

Up on this. I tried the script in the Main repo on a Fresh ubuntu 22.04 and this was giving errors. First, needed to install curl. (easy)

but then I pushd /popd where not beahving as expected. and script will fail right away Warning: Failed to open the file Install_NDI_SDK_v5_Linux.tar.gz: No such file or Directory and a nice curl: (23) Failure writing output to destination

The pushd / popd seems to have a weird effect on the curl command and the /tmp folder permission seems to prevent curl -o to write the file in there.

IIRC this is because curl -o will (open) the file to write, but if this is attached to user "nobody" it cannot. What I dont' get is this is supposedly on the /tmp folder for that kind of purpose...

Here is my temporary script before I push a PR : https://github.com/Trouffman/obs-ndi/blob/Linux-Install-enhancement/CI/libndi-get.sh

Trouffman avatar Apr 11 '24 03:04 Trouffman

I just saw that NDI SDK v6 is available now.

Could that have an impact?

Macrobiotic avatar Apr 11 '24 03:04 Macrobiotic

This should not because the script use the V5 anyway :)

Trouffman avatar Apr 11 '24 03:04 Trouffman