julia command not found even after adding to PATH - julia

I am not able to run a Julia file from the command line despite being able to use Julia fine from inside the REPL and Atom. I receive a zsh: command not found: julia error when I try that. Based on this resource, I ran export PATH="/Applications/Julia-1.4.2.app/Contents/Resources/julia/bin:$PATH" and sudo ln -s /Applications/Julia-1.4.2.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia but it did not resolve the issue. Is there anything else I could try?
edit: I am running macOS Catalina 10.15.5

ls -a /Applications/ showed that the file is actually named Julia-1.4.app

Related

I can not call riscv64-unknown-elf-gcc in archlinux

After installed the toolchain of xv6 needed on archlinux, following Tools Used in 6.S081 , I run the riscv64-unknown-elf-gcc --version, but my command line shows zsh: command not found: riscv64-unknown-elf-gcc, how can I do next?
In my archlinux, use the riscv64-linux-gnu-gcc command to compile, in macOS I use riscv64-unknown-elf-gcc, maybe try the first one, Or try typing risc and then pressing the tab key, maybe the shell will help you complete the rest of the command

Opening the atom editor from iTerm2 window is displaying - 'zsh: command not found: atom'

Just installed iTerm2 with oh-my-zsh, with atom already installed..
I have cloned a git repo of mine to use on an older laptop and for some reason oh-my-zsh is not opening my atom on the usual command.
➜ LandingPage git:(master) atom .
zsh: command not found: atom
Tried rectifying it by accessing and changing the .zshrc file but permission is denied. Anyone any suggestions?
Thanks,
Ant
As per this question/answer it looks like atom may not have created a symlink to the atom command.
This has nothing to do with zsh -- the first argument is just telling you the shell, the information after it is the error.
For example on my machine (which doesn't have atom) when running zsh and trying to open a file with atom I get zsh: command not found: atom. When I try the same command with bash, I get bash: atom: command not found.
Let me know if the above link doesn't work! Hopefully this helps.

Error using rscript

I have a Homebrew version of R installed on my Mac (OS X, El Capitan 10.11.5). I've been using rscript successfully for about two weeks now. However, when I tried to run a script this morning using rscript file.r, I get the following error:
/usr/local/Cellar/r/3.3.1/R.framework/Versions/3.3/Resources/bin/R: line 209: /usr/local/Library/ENV/4.3/sed: No such file or directory
/usr/local/Cellar/r/3.3.1/R.framework/Versions/3.3/Resources/bin/R: line 209: /usr/local/Library/ENV/4.3/sed: No such file or directory
Fatal error: cannot open file '': No such file or directory
(That is the full error. Yes, it appears twice, it is not a typo.)
After getting that error, I tried uninstalling and reinstalling r with homebrew. I get the same error. The only other package that I have installed since last using rscript (to the best of my knowledge) is pspp, but I see no reason why this should have affected rscript.
Of course, the error is saying that the file /usr/local/Library/ENF/4.3/sed cannot be found. Upon inspection of /usr/local/library this is, of course, true, but I don't know what the proper way to fix this is. It seems like rscript is just trying to access sed, which comes native on OS X.
Any ideas on what I can do?
This was found to be a bug contained within Homebrew/science. The error report can be found here: https://github.com/Homebrew/homebrew-science/issues/3839
Temporary fix for this (tested on OS X, as of 07-19-2016 12:54 PM central) from ck37 on github:
mkdir /usr/local/Library/ENV
ln -s /usr/local/Library/Homebrew/shims/super/ /usr/local/Library/ENV/4.3
Instead of doing the symlinks as a temporary fix, and until the r bottle is fixed. Short answer is to brew reinstall -s r.
I posted this answer (with an explanation to why this occurs) on the duplicate question which solved this problem for me.

Rscript: command not found

I'm working with R for a while, and I always worked with Rstudio, I tried just now to run a Rscript command in terminal (I have a mac..) and I got this error-
>Rscript script.R
-bash: Rscript: command not found
when I tried to open R in the terminal I go the same error-
>R
-bash: R: command not found
I can run R code with the Rstudio and the R application, but I know there is a way to run R throw the terminal.
Did I miss something when I installed R on my computer? do I need to add R to my PATH?
thanks in advance!
Steps to run R script through Windows command prompt
Set the PATH variable for Rscript.exein the environment variables. Rscript.exe can be found inside bin folder of R. Set the path for Rscript.exe to use Rscript command in Windows command prompt. To check if Rscript.exe has been set environmentally or not, type Rscript in command prompt. The follwoing message should come.
Go to Command Prompt, set the path where your .R file is there.
Run the following command: Here abcd.R is present under Documents folder. So I set path and then run Rscript abcd.R
For those who stumbled upon this but use a mac, you might find this useful. I recently downloaded and installed R and RStudio through the CRAN site. I didn't do it through homebrew. Since I downloaded this install directly from the site, it DID NOT add the RScript executable to my /usr/local/bin directory.
I have locate on my mac so I did a quick lookup:
locate RScript
And I found it here:
/Library/Frameworks/R.framework/Versions/4.0/Resources/bin/Rscript
What I had to do was create a symbolic link to my /usr/local/bin directory to get it to work:
cd /usr/local/bin
ln -s /Library/Frameworks/R.framework/Versions/4.0/Resources/bin/Rscript Rscript
Now I'm able to run Rscript through the command line. This may help someone else out there.

How to regenerate configure file using autoconf?

I use autoconf to regenerate the configure file, it works. But when I execute the generated configure file by ./configure, there are some error messages like
./configure: line 3713: syntax error near unexpected token `blas'
./configure: line 3713: ` withval=$with_blas; R_ARG_USE(blas)'
I googled and found that blas is a library, but it still gives the error messages after installing. I have the autoconf with version "autoconf (GNU Autoconf) 2.69" installed on my Mac, and what I am trying to compile is the R source https://svn.r-project.org/R/.
I have run both autoconf -f and autoreconf -f to try to regenerate configure file which has been generated successfully. But, when I run ./configure the error happens again.
The error messages say syntax error near unexpected token blas and withval=$with_blas; R_ARG_USE(blas). I think the problem maybe the unknown function R_ARG_USE. I grep R_ARG_USE in the code base and find that it is defined in the file m4/R.m4:
AC_DEFUN([R_ARG_USE],
[if test "${withval}" = no; then
use_$1=no
else
use_$1=yes
fi
])# R_ARG_USE
Does that mean when I am running autoconf or autoreconf I miss something to let it know the existence of m4/R.m4 ?
I have been stuck here for almost three days, any helps will be appreciated. Thanks a lot.
It seems I have solved this problem. I reinstall the gnu m4 using brew install m4 and the problem solved.
After running autoreconf -i -f, I can get the correct configure file and the R source can be compiled.
Maybe it's the wrong version m4 I have got in Mac.

Resources