一、1.10之前版本
右键,“新建窗口打开链接”,即可以得到:
https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.2-linux-x86_64.tar.gz
下面进行相关操作:
1、下载
songroom@DESKTOP-MEDPUTU:~$ wget https://julialang-s3.julialang.org/bin/linux/x64/1.7/julia-1.7.2-linux-x86_64.tar.gz
2、解压
songroom@DESKTOP-MEDPUTU:~$ tar -xvzf julia-1.7.2-linux-x86_64.tar.gz
3、拷贝至特定目录下
songroom@DESKTOP-MEDPUTU:~$ ls
] apt-get beta ctp echo fosun install julia-1.7.2 julia-1.7.2-linux-x86_64.tar.gz policy pyclick tdengine tdenginesudo updateapt-get v v_learn xtp_another_old
songroom@DESKTOP-MEDPUTU:~$ sudo cp -r julia-1.7.2 /opt/
4、建立链接
songroom@DESKTOP-MEDPUTU:~$ sudo ln -s /opt/julia-1.7.2/bin/julia /usr/local/bin/julia
5、测试
songroom@DESKTOP-MEDPUTU:~$ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.2 (2022-02-06)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
二、1.10之后版本
直接按官网上的操作即可。
1、下载
curl -fsSL https://install.julialang.org | sh
songroom@G-IT-NB-276:/$ curl -fsSL https://install.julialang.org | sh
info: downloading installer
Welcome to Julia!
This will download and install the official Julia Language distribution
and its version manager Juliaup.
Juliaup will be installed into the Juliaup home directory, located at:
/home/songroom/.juliaup
The julia, juliaup and other commands will be added to
Juliaup's bin directory, located at:
/home/songroom/.juliaup/bin
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/home/songroom/.bashrc
/home/songroom/.profile
Julia will look for a new version of Juliaup itself every 1440 minutes when you start julia.
You can uninstall at any time with juliaup self uninstall and these
changes will be reverted.
✔ Do you want to install with these default configuration choices? · Proceed with installation
Now installing Juliaup
Installing Julia 1.10.0+0.x64.linux.gnu
Configured the default Julia version to be 'release'.
Julia was successfully installed on your system.
Depending on which shell you are using, run one of the following
commands to reload the PATH environment variable:
. /home/songroom/.bashrc
. /home/songroom/.profile
2、 终端输入julia
(1) julia终端界面正常打开,则OK。
(2)julia显示异常,信息如下:
bash: /usr/bin/julia: No such file or directory
这种情况,则需要找到julia的可执行性文件的地址,并建立/usr/bin/julia的软链接。
查看julia的位置
songroom@G-IT-NB-276:~$ whereis julia
julia: /usr/bin/julia /usr/lib/x86_64-linux-gnu/julia /etc/julia /usr/share/julia /home/songroom/.juliaup/bin/julia /mnt/c/Users/hongsl/AppData/Local/Microsoft/WindowsApps/julia.exe
可看,在linux下,julia的可执行性文件位置
/home/songroom/.juliaup/bin/julia
具体也可以验证一下。进入bin文件夹,输入./julia.看看是否会打开julia终端。
在建立软链接:
sudo ln -s /home/songroom/.juliaup/bin/julia /usr/bin/julia
这样就可以了。
3、其它
如果你要uninstall Julia,可以“juliaup self uninstall”