¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

build-a-pi install command problem


 

I'm a bit of a beginner in Linux - I have a Pi 4 with 2GB of memory and latest Pi OS. Tried running the build-a-pi install command line (in the home directory as stated on Github), first time got error msg saying it couldn't create a sub directory. Put sudo in front of the command line and this time it said it couldn't find the directory it created. When I checked, I found that it had created an unnamed directory in "home", and inside the unnamed one is another "home" with "pi/pi-build/" that the command line created. The command line I used is: git clone https://github.com/km4ack/pi-build.git \ $HOME/pi-build && bash $HOME/pi-build/build-a-pi?
Haven't been able to get any further - will also have to delete the unnamed directory and the second "home" directory that was created.


 

Hey Al,

Don't just use the sudo command when something doesn't work without it. We need to understand why we are using sudo. As you learn more about Linux, you will come to understand when it is needed. BAP is not designed to be run as root which is what you are attempting to do when you use the sudo command.

Now let's see if we can resolve the issue. With your pi up and running, open the terminal window and run the following command:
git clone https://github.com/km4ack/pi-build.git $HOME/pi-build && bash $HOME/pi-build/build-a-pi

A quick explanation of what we are doing:
git clone https://github.com/km4ack/pi-build.git - downloads the code
$HOME/pi-build - tells the pi where to put the code (in the pi-build directory)
&& - is used to run multiple commands. In this case, download then execute the code.
bash $HOME/pi-build/build-a-pi - tells the pi to use bash to run the build a pi script

Make sure your username is still "pi". BAP doesn't work if you change the user name. Changing the hostname is OK.
?pi@raspberry
^^@^^^^^^^
user hostname

One last thing, Linux is case sensitive & picky. See .

Hope that helps clear things up!

--
73, de KM4ACK
|
|


 

Hi Jason,
Seems that I had an extra back-slash. Once I deleted the directories/files from my failed attempt and typed in the command line you gave me here, everything worked OK and build-a-pi was installed.
Thanks for your help.
AL