EDIT 11/April/2015 - Revisited this today. Now have a Perforce server successfully running in the background on my Raspberry Pi 2 running OSMC
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ā.
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.