Having problem to install avrdude on macOS Terminal - microcontroller

First of all, I have trouble installing avrdude via Homebrew because of some network problems. So I download it manually from its website.
However, after I unarchive the avrdude-7.0.tar.gz file I just downloaded, I can find no bin directory there. It's unusual.
Then, I added its directory to my system PATH by export PATH=$PATH:/Users/myUserName/Developer/bin/avrdude-7.0/bin/. But when I tried to use avrdude in Terminal after I restarted my computer, It says zsh: command not found: avrdude.
How can I make it works?
screenshot of avrdude-7.0 directory downloaded

Apparently you downloaded the source archive of the tool, not the executable software.
Now you have two options:
Download the binary executable.
Compile the tool yourself. Make sure you understand how to do this.

Related

Compiling R from source: RStudio doesn't find the libraries if started directly

I have compiled R 4.1.0 from source against the Intel MKL.
I have put:
source /opt/intel/oneapi/mkl/latest/env/vars.sh intel64
in ~/.bashrc.
If I open a .R file with RStudio, no problem.
But if I open RStudio directly, it is unable to start R correctly, giving me the error:
/usr/lib/rstudio/bin/rsession: error while loading shared libraries: libmkl_gf_lp64.so.1: cannot open shared object file: No such file or directory
Why is that? Doesn't RStudio run ~/.bashrc when started directly?
I am running Fedora 34 Workstation.
When shared libraries are stored in "non-standard locations" we have to tell the dynamic linker about it. That is sometimes done in the calling script (often the case with bundled software, e.g. when you download RStudio which ships with a fair number of local builds of shared libraries) but a more general solution is to tell ldconfig via its configuration.
Older systems used a line per directory in /etc/ld.so.conf. Newer systems generalize this (like many other configurations) with a directory containing small files with entries. So you can create a file named, say, /etc/ld.so.conf.d/local-mkl.conf, and place the directory path in there. If you then run sudo ldconfig all applications will know about it -- including R and RStudio calling R.

Why am I getting a zsh: exec format error?

I am trying to run the metal executable from my zsh terminal in order to meta-analyze GWAS data. I have the executable in the correct directory and have checked that it is not 0MB due to truncation.
Reproducible:
Download the Linux file from http://csg.sph.umich.edu/abecasis/metal/download/
In terminal:
PATH TO EXECUTABLE ./metal
zsh: exec format error: ./metal
You probably install wrong OS of go, for example, you might install go for MacOS in Linux
I solve this problem by installing go for correct OS
The executable has been pre-compiled on a certain distribution with libraries at a certain places at certain versions.
If you have a different distribution, libraries versions, it won't work and you better compile from the source.
Basically what you have to do is to download and extract the sources, go in the folder and execute make. (You will have probably to install make first.)
I think that's not your job at all so maybe you can find a geeky person to help you, because you may stumble upon problems, libraries to install, old versions not supported anymore, new versions not supported yet...
It happened to me when I emptied an executable by mistake.
~>true > a
~>wc -c a
0 a
~>./a
zsh: exec format error: ./a

Cloning Pintos with Ubuntu

I am trying to start doing the Pintos Stanford project on Ubuntu. I downloaded the tar file that the Stanford website provides but when I try and run
pintos -- run alarm-multiple
I get the following error:
Unrecognized character \x16; marked by <-- HERE after if ($<-- HERE near column 7 at /home/adambomb/src/pintos/src/utils/pintos line 911
I found on another stackoverflow post that I should pull from latest version of pintos:
git clone git://pintos-os.org/pintos-anon pintos
But doing this gets me an error:
Cloning into 'pintos'...
fatal: read error: Connection reset by peer
I'm not really sure where to go from here and could use some insight to fix either of these problems.
I don't really know where to go from here.
I ran into the same issues as you trying various guides on the internet (eg. this guide) and looking through StackOverflow. However, this youtube video helped me the most.
Steps below can be found here. I'm using Ubuntu 18.04.
Run sudo apt-get install qemu
Get latest pintos source code from pintos public git repository or download older version with this link
2a. Under heads, find master and click the tree hyperlink
2b. Click snapshot and download the .tar.gz file to your directory
Run tar -xvzf pintos-anon-master-{value}.tar.gz where {value} is the commit-id
Open /utils/pintos-gdb with vim and edit GDBMACROS variable to point to the full path for pintos directory
Open Makefile with vim and edit LOADLIBES variable name to LDLIBS
Compile utils directory by navigating to /src/utils and running make
Edit /src/threads/Make.vars (line 7): change bochs to qemu
Compile threads directory by navigating to /src/threads and running make
Edit /utils/pintos (line 103): replace bochs with qemu
Edit /utils/pintos (~line 257): replace kernel.bin with the full path to kernel.bin
Edit /utils/pintos (~line 621): replace qemu with qemu-system-x86_64
Edit /utils/Pintos.pm (line 362): replace loader.bin with the full path to loader.bin
Open ~/.bashrc and add export PATH=/home/.../pintos/src/utils:$PATH to the last line.
Reload terminal by running source ~/.bashrc
Run pintos with pintos run alarm-multiple

How to install ADA IDE and compiler on mac (OSX)?

I downloaded GNAT ADA GPL 2014 and now trying to install on my Mac.
The directions below are the ones I am following, but I do not know where to look to find the file called doinstall. I might still need some help after finding it, but can anyone help me out here?
Navigate to the directory that contains a file called: doinstall
Enter: sudo mkdir /usr/local/gnat
Enter: sudo ./doinstall
Update your path as needed for your shell
You should have downloaded gnat-gpl-2014-x86_64-darwin-bin.tar.gz.
Go to some temporary directory (I use ~/tmp):
cd ~/tmp
Unpack the download, which creates a directory gnat-gpl-2014-x86_64-darwin-bin containing the binary distribution to be installed:
tar zxvf ~/Downloads/gnat-gpl-2014-x86_64-darwin-bin.tar.gz
Enter that directory, which contains (amongst others) doinstall:
cd gnat-gpl-2014-x86_64-darwin-bin
Execute doinstall to enter the installation dialog:
sudo ./doinstall
Remove the unpacked download:
cd ..
rm -rf gnat-gpl-2014-x86_64-darwin-bin
Now you can update PATH as needed for your shell.
What Simon Wright said is correct, but if you're running on Yosemite there's an extra problem: for some obscure reason, Adacore GNAT is broken on Yosemite. You have to make it think it's compiling for Mavericks:
export MACOSX_DEPLOYMENT_TARGET=10.9 # Yosemite workaround
That can go in a few different places, but I put it near the top of the /usr/local/gnat/bin/gps script so it doesn't interfere with the xcodebuild environment.
Also, I found GTKAda to be nearly impossible to install from source; if you download the XNAdaLib-GPL package from http://sourceforge.net/projects/gnuada/ you can install that and get everything you need without having to wade through Adacore's mess. (You may want to use the Adacore version of Glade for GUI design though; for some reason the Sourceforge package's version is localized in French and I'm not sure if it can be switched to English.)
Finally, since this is a bit duct-tape-and-baling-wire, I would recommend not shipping any production mission-critical code with this environment; either roll back to Mavericks or wait for GNAT 2015.

Cygwin error message -- binary file not executable

So I am trying to install a program on my windows machine that required me to install Cygwin to install it. So I am working from a README file and assueme I have compiled the code previously correctly (its one line sh build.sh) and when actually trying to use the program I get the following error:
BabakP#Babak /cygdrive/c/Users/BabakP/Desktop/test
$ ./Runlock input.tst output.tst 1
./Ostrich: Exec format error. Binary file not executable.
I guess I am trying to figure out why I am getting this error so any suggestions on how to troubleshoot it would be great!
./Ostrich is a Mac executable. It can't be executed under Cygwin. (A MacOS emulator that runs under Windows or Cygwin is theoretically possible, but I don't know of any such thing.)
Without knowing the details of the software you're trying to install, it's hard to say how or whether you can fix it.
You may be able to rebuild Ostrich from source (if you have the source, and if it's not MacOS-specfic).

Resources