(Tutorial) How To Install Plex in a FreeNAS 11.2 Jail

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
following @sremick suggestion i found this link where is explained how to solve the problem and convert the database.
Here what I did:

1) deleted the packagesite line from /usr/local/etc/pkg.conf (through the vi editor);
2) # pkg install ports-mgmt/pkg
3) # pkg2ng
4) and finally # portupgrade -a

As soon as it will finish to install/upgrade all the packages, i'll see how it works (if it works...) and if everything is ok for a while, in case not, i'll nuke the jail and start from scratch as CJ suggested.
Thanks everybody for the help!!!

Did it work?

Tried updating mine to 0.9.11.7 but I'm having problems with the portupgrade -a command - command not found?

Was thinking go giving this a go...
 

sremick

Patron
Joined
Sep 24, 2014
Messages
323
Tried updating mine to 0.9.11.7 but I'm having problems with the portupgrade -a command - command not found?

You didn't follow the instructions in the first post. Under "Upgrading Plex:" near the bottom of the first post, the very first step is installing portupgrade which is appears you have not done.
 

adrianwi

Guru
Joined
Oct 15, 2013
Messages
1,231
Nope. Did these two first:

cd /usr/ports/ports-mgmt/portupgrade/ && make install clean
portsnap fetch update


Assumed they'd both run OK, but hard to tell as a lot was going on :D

A bit more googling on the Plex forum and found this which worked a treat:

Code:
freebsd-update fetch install ; portsnap fetch update ; pkg update ; pkg upgrade -fy ; portmaster -d --no-confirm multimedia/plexmediaserver-; echo $?

Followed by restarting the server:

service plexmediaserver restart

All up to date!
 
Last edited:

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
When running the pcd /usr/ports/ports-mgmt/portupgrade/ && make install clean I keep getting this:
Code:
====> Compressing man pages (compress-man)
===>  Installing for p5-Locale-gettext-1.05_4
===>  Checking if p5-Locale-gettext already installed
===>   Registering installation for p5-Locale-gettext-1.05_4 as automatic
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/mach/5.16/auto/Locale/gettext/gettext.so: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/mach/5.16/Locale/gettext.pm: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/man/man3/Locale::gettext.3.gz: No such file or directory
*** [fake-pkg] Error code 74

Stop in /usr/ports/devel/p5-Locale-gettext.
*** [build-depends] Error code 1

Stop in /usr/ports/misc/help2man.
*** [install] Error code 1

Stop in /usr/ports/misc/help2man.
*** [build-depends] Error code 1

Stop in /usr/ports/devel/autoconf.
*** [build-depends] Error code 1

Stop in /usr/ports/lang/ruby20.
*** [install] Error code 1

Stop in /usr/ports/lang/ruby20.
*** [extract-depends] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
*** [install] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
root@test:


Im just following ravestein's instructions, trying to get up and running.

Any ideas?
 
Last edited:
Joined
Mar 6, 2014
Messages
686
You followed all exact steps after fresh install?
Code:
pkg update && pkg upgrade
portsnap fetch extract (or portsnap fetch update if this is not the first time updating ports)
cd /usr/ports/ports-mgmt/portupgrade/ && make install clean


I just did all of this in a fresh jail to test (latest 9.3) and everything works fine for me (accepting all default values)
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
You followed all exact steps after fresh install?
Code:
pkg update && pkg upgrade
portsnap fetch extract (or portsnap fetch update if this is not the first time updating ports)
cd /usr/ports/ports-mgmt/portupgrade/ && make install clean


I just did all of this in a fresh jail to test (latest 9.3) and everything works fine for me (accepting all default values)

Ive been having issues with my jails lately, I think this is the last straw. Im wiping everything and starting from scratch
Guess ill be making that 6 disk vdev now...
 
Last edited:

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
You followed all exact steps after fresh install?
Code:
pkg update && pkg upgrade
portsnap fetch extract (or portsnap fetch update if this is not the first time updating ports)
cd /usr/ports/ports-mgmt/portupgrade/ && make install clean


I just did all of this in a fresh jail to test (latest 9.3) and everything works fine for me (accepting all default values)
I wiped my drives and reinstalled freenas+updated and still get the same error when I run.

cd /usr/ports/ports-mgmt/portupgrade/ && make install clean
Im just hitting enter and accepting all the defaults.

I also get an error when doing the pkg upgrade, only for Apache then it completes normally.

I should add that this is using the VirtualBox template 4.3.12

edit, it was the jail. I followed the default template download location and found the location for the standard jails. I created a new template and tried the steps again ant they worked.
 
Last edited:
Joined
Mar 6, 2014
Messages
686
I should add that this is using the VirtualBox template 4.3.12
edit, it was the jail. I followed the default template download location and found the location for the standard jails. I created a new template and tried the steps again ant they worked.
Duh...
...
Select the following:
Jail Name: plex
Type: pluginjail or standard (your choice)
IPv4 Address
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
Yeah, I had thought that the Virtualbox template thats installed by a plugin was the "pluginjail" type. Had a bit of an ah-ha moment when I did some digging around.
 
Joined
Mar 6, 2014
Messages
686
Yeah, plugin jail is gone, that's why it is not in my verson of the guide for 9.3 ;)
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
Yeah, plugin jail is gone, that's why it is not in my verson of the guide for 9.3 ;)

Great write up none the less :p

2 questions:

Is it possible to ONLY update Plex and not the other ports? Would that be where you run the portupgrade -ai?

Is this the proper list to all of the ports available when you do the portsnap fetch extract? Im curious what other toys there are to play around with.
 
Last edited:
Joined
Mar 6, 2014
Messages
686
Read this. Especially 5.5.3.2. Upgrading Ports Using Portupgrade

There are currently 24064 ports available. Have fun playing around :eek:
But seriously, dont waste your time doing that. If you have a need, find the application that fulfills that need. Then find the FreeBSD version of that program in the ports or investigate alternatives. Also think twice before installing it on your NAS that holds your precious data.
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
Read this. Especially 5.5.3.2. Upgrading Ports Using Portupgrade

There are currently 24064 ports available. Have fun playing around :eek:
But seriously, dont waste your time doing that. If you have a need, find the application that fulfills that need. Then find the FreeBSD version of that program in the ports or investigate alternatives. Also think twice before installing it on your NAS that holds your precious data.

Awesome.

" To upgrade only a specified application instead of all available ports, use portupgrade pkgname. It is very important to include -R to first upgrade all the ports required by the given application:

# portupgrade -R firefox "
 

rumdr19

Dabbler
Joined
Jan 18, 2015
Messages
28
Upgrading Plex:

When new releases of Plex come out, you may update without losing your data and preferences. To check if a new release of Plex is available via ports, visit this page:
http://www.freshports.org/multimedia/plexmediaserver/

To upgrade Plex, first install a tool called portupgrade with this command:
cd /usr/ports/ports-mgmt/portupgrade/ && make install clean


When configuration dialog boxes appear, accept the defaults.

Next, you have to update the FreeBSD port tree with this command:
portsnap fetch update

Then to upgrade all ports at once, use the following:
portupgrade -a

Alternatively, you can have portupgrade prompt you before upgrading each port with this:
portupgrade -ai

Afterwards, your ports, including Plex, should be up to date.

I was able to install plex in the jail. However when i try to follow the "Upgrading Plex" portion of it I get the following errors. I have follow a few other guides related to these error however, no help. Any ideas?

Code:
cd /usr/ports/ports-mgmt/portupgrade/ && make install clean


Code:
===>  License BSD3CLAUSE accepted by the user
===>  Found saved configuration for portupgrade-2.4.13_1,2
===>   portupgrade-2.4.13_1,2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by portupgrade-2.4.13_1,2 for building
===>  Extracting for portupgrade-2.4.13_1,2
=> SHA256 Checksum OK for portupgrade/pkgtools-2.4.13.tar.bz2.
===>   portupgrade-2.4.13_1,2 depends on file: /usr/local/bin/ruby21 - not found
===>    Verifying install for /usr/local/bin/ruby21 in /usr/ports/lang/ruby21
===>   ruby-2.1.5_2,1 depends on package: libffi>=0 - found
===>   ruby-2.1.5_2,1 depends on package: libedit>=0 - found
===>   ruby-2.1.5_2,1 depends on file: /usr/local/bin/autoconf-2.69 - not found
===>    Verifying install for /usr/local/bin/autoconf-2.69 in /usr/ports/devel/autoconf
===>   autoconf-2.69 depends on executable: gm4 - found
===>   autoconf-2.69 depends on executable: help2man - not found
===>    Verifying install for help2man in /usr/ports/misc/help2man
===>   help2man-1.43.3_1 depends on package: p5-Locale-gettext>=0 - not found
===>    Verifying install for p5-Locale-gettext>=0 in /usr/ports/devel/p5-Locale-gettext
===>  Installing for p5-Locale-gettext-1.05_4
===>   p5-Locale-gettext-1.05_4 depends on file: /usr/local/bin/perl5.18.4 - found
===>   p5-Locale-gettext-1.05_4 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so.8.1.3)
===>  Checking if p5-Locale-gettext already installed
/usr/local/lib/libintl.so.8.1.3
/usr/local/bin/perl5.18.4
===>   Registering installation for p5-Locale-gettext-1.05_4 as automatic
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/mach/5.16/auto/Locale/gettext/gettext.so: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/mach/5.16/Locale/gettext.pm: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/man/man3/Locale::gettext.3.gz: No such file or directory
*** [fake-pkg] Error code 74

Stop in /usr/ports/devel/p5-Locale-gettext.
*** [build-depends] Error code 1

Stop in /usr/ports/misc/help2man.
*** [install] Error code 1

Stop in /usr/ports/misc/help2man.
*** [build-depends] Error code 1

Stop in /usr/ports/devel/autoconf.
*** [build-depends] Error code 1

Stop in /usr/ports/lang/ruby21.
*** [install] Error code 1

Stop in /usr/ports/lang/ruby21.
*** [extract-depends] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
*** [install] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
 
Joined
Mar 6, 2014
Messages
686
This is not the command to upgrade. This is the command to install
 

nick779

Contributor
Joined
Dec 17, 2014
Messages
189
I was able to install plex in the jail. However when i try to follow the "Upgrading Plex" portion of it I get the following errors. I have follow a few other guides related to these error however, no help. Any ideas?

Code:
cd /usr/ports/ports-mgmt/portupgrade/ && make install clean


Code:
===>  License BSD3CLAUSE accepted by the user
===>  Found saved configuration for portupgrade-2.4.13_1,2
===>   portupgrade-2.4.13_1,2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by portupgrade-2.4.13_1,2 for building
===>  Extracting for portupgrade-2.4.13_1,2
=> SHA256 Checksum OK for portupgrade/pkgtools-2.4.13.tar.bz2.
===>   portupgrade-2.4.13_1,2 depends on file: /usr/local/bin/ruby21 - not found
===>    Verifying install for /usr/local/bin/ruby21 in /usr/ports/lang/ruby21
===>   ruby-2.1.5_2,1 depends on package: libffi>=0 - found
===>   ruby-2.1.5_2,1 depends on package: libedit>=0 - found
===>   ruby-2.1.5_2,1 depends on file: /usr/local/bin/autoconf-2.69 - not found
===>    Verifying install for /usr/local/bin/autoconf-2.69 in /usr/ports/devel/autoconf
===>   autoconf-2.69 depends on executable: gm4 - found
===>   autoconf-2.69 depends on executable: help2man - not found
===>    Verifying install for help2man in /usr/ports/misc/help2man
===>   help2man-1.43.3_1 depends on package: p5-Locale-gettext>=0 - not found
===>    Verifying install for p5-Locale-gettext>=0 in /usr/ports/devel/p5-Locale-gettext
===>  Installing for p5-Locale-gettext-1.05_4
===>   p5-Locale-gettext-1.05_4 depends on file: /usr/local/bin/perl5.18.4 - found
===>   p5-Locale-gettext-1.05_4 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so.8.1.3)
===>  Checking if p5-Locale-gettext already installed
/usr/local/lib/libintl.so.8.1.3
/usr/local/bin/perl5.18.4
===>   Registering installation for p5-Locale-gettext-1.05_4 as automatic
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/mach/5.16/auto/Locale/gettext/gettext.so: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/mach/5.16/Locale/gettext.pm: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/p5-Locale-gettext/work/stage/usr/local/lib/perl5/site_perl/man/man3/Locale::gettext.3.gz: No such file or directory
*** [fake-pkg] Error code 74

Stop in /usr/ports/devel/p5-Locale-gettext.
*** [build-depends] Error code 1

Stop in /usr/ports/misc/help2man.
*** [install] Error code 1

Stop in /usr/ports/misc/help2man.
*** [build-depends] Error code 1

Stop in /usr/ports/devel/autoconf.
*** [build-depends] Error code 1

Stop in /usr/ports/lang/ruby21.
*** [install] Error code 1

Stop in /usr/ports/lang/ruby21.
*** [extract-depends] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.
*** [install] Error code 1

Stop in /usr/ports/ports-mgmt/portupgrade.

Are you using the default jail, or did you create a new template for a full jail?

I made that mistake a few posts back
 

rumdr19

Dabbler
Joined
Jan 18, 2015
Messages
28
This is not the command to upgrade. This is the command to install
to install "portupgrade" if I understand it correctly. I can not get it to install properly. I am not well versed in FreeBSD.
 

rumdr19

Dabbler
Joined
Jan 18, 2015
Messages
28
Are you using the default jail, or did you create a new template for a full jail?

I made that mistake a few posts back
It is a "standard" jail using the defaults settings.
 
Joined
Mar 6, 2014
Messages
686
Ah yes you are correct... I read it wrong...
First: pkg update & pkg upgrade
Then: portsnap fetch extract (if first time) or portsnap fetch update
Then use the command to Install portupgrade
 

rumdr19

Dabbler
Joined
Jan 18, 2015
Messages
28
Ah yes you are correct... I read it wrong...
First: pkg update & pkg upgrade
Then: portsnap fetch extract (if first time) or portsnap fetch update
Then use the command to Install portupgrade

Thanks a lot. That did it. I just need to head over to the plex forums in order to find an "easy" way to migrate my database from a plugin installed plex to this new goodness.
 
Top