Added rar using pkg_add but not properly installed?

Status
Not open for further replies.

Ravefiend

Dabbler
Joined
Jun 1, 2011
Messages
37
Wanted to add rar to my FreeNAS installation (not in a jail), so did the following:

Code:
[root@storage] ~# mount -urw /
[root@storage] ~# pkg_add -v -r rar
scheme:   [ftp]
user:     []
password: []
host:     [ftp.freebsd.org]
port:     [0]
document: [/pub/FreeBSD/ports/amd64/packages-8.3-release/Latest/rar.tbz]
---> ftp.freebsd.org:21
looking up ftp.freebsd.org
connecting to ftp.freebsd.org:21
<<< 220 beastie.tdk.net FTP server (Version 6.00LS) ready.
>>> USER anonymous
<<< 331 Guest login ok, send your email address as password.
>>> PASS root@storage.local
<<< 230 Guest login ok, access restrictions apply.
>>> PWD
<<< 257 "/" is current directory.
>>> CWD pub/FreeBSD/ports/amd64/packages-8.3-release/Latest
<<< 250 CWD command successful.
>>> MODE S
<<< 200 MODE S accepted.
>>> TYPE I
<<< 200 Type set to I.
setting passive mode
>>> PASV
<<< 227 Entering Passive Mode (193,162,146,4,220,231)
opening data connection
initiating transfer
>>> RETR rar.tbz
<<< 150 Opening BINARY mode data connection for 'rar.tbz' (557764 bytes).
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8.3-release/Latest/rar.tbz...x +CONTENTS
x +COMMENT
x +DESC
x +MTREE_DIRS
x bin/rarWaiting for final status
<<< 226 Transfer complete.

x lib/default.sfx
x etc/rarfiles.lst
x man/cat1/rar.1
x share/licenses/rar-4.1.1,3/catalog.mk
x share/licenses/rar-4.1.1,3/LICENSE
x share/licenses/rar-4.1.1,3/RAR
x share/doc/rar/technote.txt
x share/doc/rar/license.txt
x share/doc/rar/whatsnew.txt
x share/doc/rar/order.htm
x share/doc/rar/readme.txt
tar command returns 0 status
 Done.
extract: Package name is rar-4.1.1,3
extract: CWD to /usr/local
extract: /usr/local/bin/rar
extract: /usr/local/lib/default.sfx
extract: /usr/local/etc/rarfiles.lst
extract: /usr/local/man/cat1/rar.1
extract: /usr/local/share/licenses/rar-4.1.1,3/catalog.mk
extract: /usr/local/share/licenses/rar-4.1.1,3/LICENSE
extract: /usr/local/share/licenses/rar-4.1.1,3/RAR
extract: CWD to /usr/local
extract: CWD to /usr/local
extract: /usr/local/share/doc/rar/technote.txt
extract: /usr/local/share/doc/rar/license.txt
extract: /usr/local/share/doc/rar/whatsnew.txt
extract: /usr/local/share/doc/rar/order.htm
extract: /usr/local/share/doc/rar/readme.txt
Running mtree for rar-4.1.1,3..
mtree -U -f +MTREE_DIRS -d -e -p /usr/local >/dev/null
Attempting to record package into /var/db/pkg/rar-4.1.1,3..
Package rar-4.1.1,3 registered in /var/db/pkg/rar-4.1.1,3
[root@storage] ~# rar

CORRECT>tar (y|n|e|a)? no
rar: Command not found.
[root@storage] ~# which rar
rar: Command not found.
[root@freenas] ~# echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin:/usr/local/fusion-io
[root@freenas] ~# /usr/local/bin/rar 

RAR 4.11   Copyright (c) 1993-2012 Alexander Roshal   17 Feb 2012
Shareware version         Type RAR -? for help

Usage:     rar <command> -<switch 1> -<switch N> <archive> <files...>
               <@listfiles...> <path_to_extract\>

<Commands>
  a             Add files to archive
  c             Add archive comment
...


Why does is only work using the complete path to rar?
 

Ravefiend

Dabbler
Joined
Jun 1, 2011
Messages
37
A slight bump* .. I'm curious to know if this is due to the way FreeNAS is set up or not.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Installing anything outside the jail is a bad idea and pretty much not supported or recommended. A few people will help out if they know it just won't work or have some advice because they tried to do it themselves.

There's only a few 10s of MB free on the USB stick and your app will disappear anytime you install a FreeNAS update. This is why the jail was created.

Generally though, anyone trying to install stuff on the USB instead of a jail figures out later that its hard and impossible most of the time. That's why when someone posts instructions for setting up one and using it there's often a post that "this is a very bad idea". If you're just trying to use rar surely you can do that inside a jail... You could even setup rar to auto-rar any folder that appears in a particular location. Create a folder like /mnt/tank/autorar and use mountpoints to hand it off to the jail.

Setup the jail to take any folder and make a rar, then delete the folder(or move it to a "completed" folder). So you dump the folder /mnt/tank/autorar/Win7ISO and you check back 20 mins later and see that you now have /mnt/tank/autorar/Win7ISO.rar. :)

Edit: My thumbdrive has an amazing 485k free and I'm not doing anything special. So yeah.. not much space to do anything with. And when you run out of space expect lots of errors and other nasty stuff to start happening.
 

Ravefiend

Dabbler
Joined
Jun 1, 2011
Messages
37
Thanks for taking the time to clarify that and yes, I guess I'll better stay away from installing things directly on FreeNAS. :)
 
Status
Not open for further replies.
Top