apt-get: command not found

Posted by pshock13 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
apt-get: command not found
September 07, 2017 02:51AM
So I need to install a library in order to have a remote controlled shutdown PHat work correctly. however, apt-get isn't used to install things, so what is?
Re: apt-get: command not found
September 09, 2017 01:48PM
Hi,
PirateBox is based on Archlinux and not Debian (like raspbian).
You should checkout ArchLinux Wiki and the command you are looking for is "pacman"

best regards Matthias
Re: apt-get: command not found
September 11, 2017 01:24AM
I'll check it out, I was trying apt-get and yum (the only two I've ever heard of)

Thanks again Matthias
Re: apt-get: command not found
September 11, 2017 07:58AM
Alright, so it looks like this PHat might only be able to be used on a Debian system.
1. It can't even locate the library
2. I'm asked to edit /etc/rc.local which I'm not seeing on this system.

Here's the step by step for getting this remote control shutoff to work

Quote

How to set it up

1. Remove your TF card and connect it to your PC or laptop with TF card adapter.
2. Modify /boot/config.txt file as following, for example, my pi is Raspberry Pi 3 model B:

device_tree=bcm2710-rpi-3-b.dtb
dtoverlay=power-off,gpiopin=26
dtoverlay=pi3-act-led,gpio=21

3. Install the library of wiringPi and Download shell script to check the GPIO pin's status:

sudo apt-get install -y wiringPi
cd ~
git clone https://github.com/yoyojacky/powerbutton.git

cd ~/powerbutton
sudo  mv   ~/powerbutton/gpioshutdown    /etc/init.d/
sudo  chmod   +x   /etc/init.d/gpioshutdown


4. Edit the initialized file in /etc/rc.local :

sudo  nano   /etc/rc.local


Add those three lines before exit 0

sudo /etc/init.d/gpioshutdown &      #Thanks for Steven Porter's kindly advise. (update the "&" mark at the end of command)
gpio mode 25 out
gpio write 25 1


After edit this file, Press "Ctrl + X" to save this file and Press "Y“ to save it.

5. Reboot your Raspberry Pi and plug power button on your RPi, press the button to test.


I have another Pi that I was able to get the remote PHat working on, would it work do you think if I were to copy those files that are downloaded and create /etc/rc.local on the Piratebox?
or I guess installing 'wiringPi' would still be a crucial part that I cant move over to the piratebox...
Re: apt-get: command not found
September 13, 2017 08:05AM
rc.local is an obsolete function. If you want to do a sort of compatibility setup, you can follow this howto [raymii.org]

Another option is to write a proper systemd-service file winking smiley

best regards Matthias