Connecting Ala mode

I am trying to get alamode to connect with p13b i have downloaded the alamode git repository files to Desktop and can find them i have gone to directory Desktop\alamode-setup then typed $ sudo ./setup
and I get “no such file or directory” can any body help?I attempting to control CNC with alamode and arduino controller shield.

Do an “ls -l setup*” in the alamode-setup directory.

Does the file exist? Remember that Linux is case sensitive. “Setup” is not the same as “setup”.

Is the file executable? Try “chmod +x setup”

I am also pretty sure the setup script is in the place you extracted the alamode software, not in a sub-directory.

See the following.

I tried “chmod +x setup” and it did nothing just reset to directory line.
“pi@raspberrypi:~/Desktop/alamode-setup $”.with no errors on display.
Tried “Is -I setup*” in the alamode-setup directory and got “bash: Is: command not found.”
If I double click on the setup icon an Execute File window opens
if I open file it shows contents of file, and starts with “#!/bin/bash”.
if I press Execute I get “failed to execute child process /home/pi/Desktop/alamode-setup/setup(No such file or directory)”.
If I press "open in terminal " I get a blank terminal screen and i cannot enter any text to it.

Not that it’s necessarily related to the original issue, though something is fundamentally wrong with your setup if ls is not working in terminal.

Out of curiosity, I’ve unzipped the file, ran the script, nothing unusual to report (though I don’t have the hardware to test with). The bash script cp and other commands ran as expected. If things don’t work out on your end, it might be best to get in touch with the team behind this project

I don’t think the problem is with the alamode setup, but the way Daryl has set up his system.

The ls command is in the system directories, and should be found unless the PATH variable has been reset, or set to something completely silly.

The “chmod +x setup” command should return without any display. It sets execute permission on the file for user, group, and other.

The “#!/bin/bash” at the start of the file is perfectly ok. It is the standard method in Linux to the loader, saying use the program after the “#!” to execute the program.

So first thing to do is sort out your environment, and make it useable BEFORE trying to install alamode.

1 Like

That’s a good point. @Daryl87976, if you are left unsure then often it’s easier to just start with a fresh image, especially if you’re new to Raspbian/Debian and you don’t have a lot of work to migrate over.

If you end up in the same situation, then a script (or two) in the setup process might be misbehaving (though it’s a popular enough product, so that shouldn’t be the case).

Ok I setup new sd card with latest NOOBS rebooted pi went to Wyolm web sit downloaded wget
that worked fine
then pi@raspberrypi ~ $ tar -xvzf alamode-setup.tar.gz that works fine then pi@raspberrypi ~ $ sudo ./setup I get “sudo: ./setup: command not found”
I then opened pi@raspberrpi~/alamode-setup $ sudo ./setup [/code] and got "sudo: unable to execute ./setup: no such file or directory

I had the same issue. Somebody has been editing the file in their Windows environment without turning off CRLF (when you hit enter it adds carriage+return, line-feed). Linux only has the LF and tries to interpret the CR as a part of the command.

The easy way to fix it is to install the program dos2unix as follows:

sudo apt-get install dos2unix

Once you’ve installed dos2unix type the commands as follows:

tar -xvzf alamode-setup.tar.gz
cd alamode-setup
dos2unix setup
chmod +x setup
sudo ./setup

You should also raise an issue with the Github author.


Nice pickup Shaun!

Thanks for the help Shaun but I followed your instruction all work good until
sudo ./setup
I got sed: can't read /etc/inittab:No such file or directory
rm: cannot remove '/etc/inittabbk': No such file or directory

This is due to the different methods used to get the operating system up and running, and what process is the first to run and kick everything off.

For many years, the default was to use the SysVinit system and the init process was used to do this. This uses the file /etc/inittab to figure out what processes needed to be run, and in what order, to get the machine to the required state.

In the Jessy and Wheezy releases of Debian, systemd was made the default, and inittab wasn’t used or required. It was possible to revert to the SysV style by installing the package sysvinit-core. e.g.

sudo apt-get install sysvinit-core
sudo shutdown -r now

You could try the same with raspian buster. I can’t guarantee it will work, or that it won’t break some other things, as there is no requirement for packages to provide startup and shutdown scripts for SysVinit.

As your primary requirement is to get alamode running, it’s your best shot. If it does work, sweet. If not, you will have to dissect the setup script for alamode, and work out what needs to be done to get alamode to install with systemd.

In any case, push this upstream to alamode’s makers for a permanent resolution, and updated installation instructions.