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.