Can't install package through pkg add

Hello! I am having trouble understanding why I cannot locally install this older version of node. The version available in the repository is v22, and the software I am using in my jail relies on v8. I am using this link straight from the Nodejs website to install from.

First, I tried installing my package from a url, and quickly found out that this seemed to not be possible. I then went down the rabbit hole of transferring my file to the system locally to try installing from there.

I have successfully made the node-v8.17.0.tar.gz file visible and useable in my jail through the system shell by using cp node-v8.17.0.tar.gz /mnt/<jailpool>/iocage/jails/<programjail>/root/usr/home/<username>/

From here, I attempted to install the package through:
pkg add /usr/home/<username>/node-v8.17.0.tar.gz
This returns
pkg: /usr/home/p0pc47/node-v8.17.0.tar.gz is not a valid package: no manifest found
Failed to install the following 1 package(s): /usr/home/p0pc47/node-v8.17.0.tar.gz

Is there something I’m missing? I am still learning about FreeBSD, and this is the first time I’ve actually sat down to attempt to restore this program. I finally got everything set up with the web gui working, but hit a brick wall when the openjdk version was incorrect. It got worse with pkg update and pkg upgrade because the Node.js version happened to update as well. I obviously overlooked this, and I am now attempting to restore it to the correct version.

Version of TrueNAS Core? FreeBSD version of jail?

You’re likely on an EOL FreeBSD base, which the pkg binary repo has been decommissioned.

The error message states it quite plainly: the file is not a FreeBSD package.

Where from did you get it?

I’m on the latest version of core, 13.0-U6.7.
Jail version is 13.1-RELEASE-p9.

Latest version of core is 13.3 but it’s only available via manual update file not through the GUI…

1 Like

My bad, I forgot I can’t link it.

The file is from the nodejs website. To find it you can search “nodejs org index download release latest carbon 8.17.0” on google

Even still, I don’t believe that would change anything regarding the use of pkg? I feel I may just be missing something in my steps

This is relevant.

Does this mean I can’t installl the local file? I know my version is EOL, but I’d just like to get the jail working again for a couple months while I prepare to upgrade to the newer version

This:

Looks like you downloaded the source code archive. There is no FreeBSD package on the node.js web site.

You could try to check out an old release of the FreeBSD ports tree and build from ports - not guaranteed to work, though.

EOL software is - well - EOL. FreeBSD removes all outdated packages from their repos. There are jurisdictions where you could be liable for distributing known outdated and insecure software.

1 Like

Okay, so from my understanding it is that the pkg install relies on a certain package format to install programs, and you can not just throw a file at it and expect it to install. FreeBSD makes this easier by having those programs already created as a port, but since the release is not current it’s not available.

Where might I find the old release?

Thank you for helping me understand this.

Nowhere - it’s gone for good.

You can use git to clone the FreeBSD ports tree for FreeBSD 13.1 and use ports to install - if the old ports version still works and all prerequisites are met, i.e. all software node depends on can still be found and downloaded and compiled successfully.

If I remember correctly, node.js on FreeBSD is not managed via packages.

node.js is written in Java, so you make sure you have a version of Java as needed by the version of node.js that you want to run and just unpack the node.js in a directory.

Follow the instructions here Node.js — Download Node.js® … Oh wait, there are very little instructions, they assume you are a node.js developer and know what to do. Sorry I can’t be more help, I am not a node.js developer.

It is:

https://www.freshports.org/search.php?stype=name&method=prefix&query=node&num=10&category=&orderby=category&orderbyupdown=asc&search=Search&format=html&branch=head

1 Like

Is that to be viewed as one way to install, or the way to do it?

It’s the only way available to you to install an outdated version of node on an outdated version of FreeBSD and it’s not guaranteed to succeed.

Binary packages are gone.

For supported releases the way is of course pkg.