unofficial-unifi / unifi-pfsense

A script that installs the UniFi Controller software on pfSense and other FreeBSD systems
BSD 2-Clause "Simplified" License
755 stars 245 forks source link

FreeBSD:14:amd64 libpthread-stubs not found #308

Closed drohack closed 1 year ago

drohack commented 1 year ago

I'm getting the following error trying to install the unifi controller on my pfsense box (version 2.7.0-DEVELOPMENT (amd64)):

Package libXdmcp-1.1.3 already installed.
Fetching : . done
pkg: archive_read_open_filename(/tmp/.XXXXX): Unrecognized archive format

Failed to install the following 1 package(s): https://pkg.freebsd.org/FreeBSD:14:amd64/latest/

Steps: In pfSense GUI go to Diagnostics -> Command Prompt and enter in the following command: fetch -o - https://git.io/j7Jy | sh -s

I get the following output:

sh: mongod: not found
Mounting new filesystems... done.
Removing discontinued packages...
Usage: pkg lock [-lqy] [-a|[-Cgix] <pkg-name>]
       pkg lock --has-locked-packages
       pkg unlock [-lqy] [-a|[-Cgix] <pkg-name>]
For more information see 'pkg help lock'.
Usage: pkg delete [-DfnqRy] [-Cgix] <pkg-name> ...
       pkg delete [-Dnqy] -a

For more information see 'pkg help delete'.
 done.
Installing required packages...
packagesite.pkg                                       6590 kB 3525 kBps    02s
x packagesite.yaml.sig
x packagesite.yaml.pub
x packagesite.yaml
Package png-1.6.39 already installed.
Package brotli-1.0.9,1 already installed.
Package freetype2-2.12.1_2 already installed.
Package fontconfig-2.14.2,1 already installed.
Package alsa-lib-1.2.2_1 already installed.
Package mpdecimal-2.5.1 already installed.
Package python37-3.7.16_2 already installed.
Package libfontenc-1.1.4 already installed.
Package mkfontscale-1.2.1 already installed.
Package dejavu-2.37_1 already installed.
Package giflib-5.2.1 already installed.
Package xorgproto-2022.1 already installed.
Package libXdmcp-1.1.3 already installed.
Fetching : . done
pkg: archive_read_open_filename(/tmp/.XXXXX): Unrecognized archive format

Failed to install the following 1 package(s): https://pkg.freebsd.org/FreeBSD:14:amd64/latest/

Looking at the actual script (https://raw.githubusercontent.com/gozoinks/unifi-pfsense/master/install-unifi/install-unifi.sh) I see that it's trying to AddPkg libpthread-stubs next. My "ABI" is "FreeBSD:14:amd64". So I checked the https://pkg.freebsd.org/FreeBSD:14:amd64/latest/packagesite.pkg and there is no libpthread-stubs in \packagesite\packagesite.yaml...

So I guess my next possible step is to manually install libpthread-stubs. But I'm not sure which version to install. But even if I did manually install it I would need to create a new script and remove that line from it.

pelstob commented 1 year ago

I've just encountered the same problem, while looking for the packages I found this: https://forums.freebsd.org/threads/devel-libpthread-stubs-port-has-been-deleted-no-consumers-left-and-never-supported-pthread-stubs-in-libc-on-freebsd.88350/

Based on this I downloaded the install-unifi.sh file, commented out the AddPkg libpthread-stubs line and re-ran the script locally. From what I can tell it seems to have installed okay. My backup restored and my devices have been re-adopted. Clients are showing as expected and the topology map has updated.

drohack commented 1 year ago

OK Yes I did the same thing. I had to download the .sh file. Comment out the libpthread-stubs. Save it. Upload it to the pfSense Router. Use chmod u+e xxx.sh to be able to run it. SSH into the server, and run the .sh file (if I tried to do it in the GUI it would time out before it finished. It's possible that it still finished, but I couldn't see the output). Ugh, slightly a bit roundabout.