SOLVED - Perforce server running behind OSMC on Raspberry Pi 2

EDIT 11/April/2015 - Revisited this today. Now have a Perforce server successfully running in the background on my Raspberry Pi 2 running OSMC :slight_smile: Time will tell if it survives updates etc but fingers crossed all will be well.

=======================================================================

Hey everyone. Iā€™m relatively new to the world of media servers and Raspberry Pis so apologies if I appear completely clueless, itā€™s because I am.

Iā€™ve been trying to get my Pi 2 plus two external ntfs HDDs (one primary, one nightly backup) running something which will play all my media files (some of which uses very old codecs), and OSMC does that job very well. I am currently running ā€˜Alpha4ā€™. Iā€™d also like to set up my Pi 2 to be a Perforce server for some indie game and RPG projects my friends and I are working on. Does anyone know if this is actually possible whilst also using OSMC (Iā€™ve tried with some success using Rasbian)?

Iā€™m part way through setting it up and have hit a snag that I canā€™t seem to figure out a workaround for. Iā€™ve got part of the way through this tutorial: http://www.perforce.com/blog/140228/run-p4d-website-raspberry-pi, with the only changes needed being adding ā€˜sudoā€™ before some of the commands to get them to run. Iā€™ve hit a problem here:

4.) Start p4d:
mkdir /home/pi/p4root
p4d -r /home/pi/p4root -p raspberrypi:1666 -d

I get ā€œ-bash: /usr/local/bin/p4d: No such file or directoryā€ returned, whereas when I ran this same command under Raspbian it would work fine. Iā€™ve checked in that directory and ā€œp4dā€ definitely exists there.

Any ideas? Am I barking up the wrong Pi? Is this something to do with the way OSMC is set up or does the problem lie elsewhere?

Thanks in advance.

Check your PATH variable in ~/.bashrc, and add /usr/local/bin if it doesnā€™t exist (but that dir should be default).
ATM, ā€œ/usr/local/bin/p4d -r /home/osmc/p4root -p raspberrypi:1666 -dā€ should work

Also:

  • OSMC default user is called osmc, not pi, so you have to change directories.
  • if you want to create a directory structure, and parents do not exist, use mkdir -p

Thanks for the reply. Iā€™m getting the same message returned using your command. I also canā€™t see anywhere obviously referring to a PATH variable or to /usr/local/bin in ~/.bashrc. The closest I can see is this:

# set variable identifying the chroot you work in (used in the prompt below)
if [ -z ā€œ${debian_chroot:-}ā€ ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

Is that what you mean? Again, sorry for being totally clueless.

Hi, Iā€™m glad to help (or at least try).

Could you type:
ā€œwhereis p4dā€
It should give you a path to p4d binary.
If itā€™s empty, p4d is not present in your system.

PATH entry in .bashrc should look like that:
export PATH="$PATH:path_to_directory"

Have you tried to reboot your pi?

To see what is in your PATH you can run
echo $PATH

My standard installation of Alpha 4 gives this for an example

osmc@osmc:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/opt/vc/bin

Thanks SimonO. My PATH looks exactly the same as yours, so that Perforce command should work. Hmm.

whereis p4d gives this:

p4d: /usr/local/bin/p4d

echo $PATH gives:

/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/sbin:/usr/sbin:/opt/vc/bin

Iā€™m pretty sure my Pi has been rebooted since trying this, but Iā€™ll give it a go to be sure.

Rebooted it, command still returns ā€œno such file or directoryā€. :confused: Any ideas?

To fix this, I had to enter:

sudo ln -s /lib/ld-linux-armhf.so.3 /lib/ld-linux.so.3

I found this here:

http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=10234&p=115749&hilit=bazaar#p115749

Iā€™ve hit another stumbling block though, but I think this is specifically Perforce related rather than Pi related. Now when I run that same command I get ā€œCannot assign requested addressā€.

This is the step Iā€™m following:

4.) Start p4d:
mkdir /home/pi/p4root
p4d -r /home/pi/p4root -p raspberrypi:1666 -d

however I want the root location to be /media/USBHDD1/shares/Projects so Iā€™ve changed it accordingly.

Ok, Iā€™ve got that working now, and it says the Perforce server has started, but I cannot connect to that port using local network address and friends cannot connect using WAN IP. Le sigh.