Win10 embedded ubuntu18.04 to install gamit10.71 and error resolution

Win10 embedded ubuntu18.04 to install gamit10.71 and error resolution

1. Gamit 10.7 open source software download link

Before installing the software, let me share the GAMIT10.71 software that I installed successfully for everyone to download and install.
The source file has 2.74 G. The specific content is as shown in the figure below. The uploaded is the download link of Baidu Netdisk, just save and download directly.
The content is a bit long, if you operate according to the full text, it will definitely be installed successfully, so please be patient.

https://download.csdn.net/download/u011322358/19682760?spm=1001.2014.3001.5501

1.1 Upload software
insert image description here
insert image description here
1.2 First update the system and obtain root privileges

sudo -s

update is to update the addresses of the sources listed in /etc/apt/sources.list and /etc/apt/sources.list.d, so that the latest software packages can be obtained.
upgrade is to upgrade all installed software packages. After the upgrade The latest version is in the local address, so you must execute update before executing upgrade, so as to update to the latest version.

apt-get update
apt-get upgrade
apt-get dist-upgrade

2. First install the configuration environment required by gamit

All the following configuration environments must be installed, and the installation is successful. If the network speed is slow during the download process, please switch the source source. The source source used by me is as follows. You can refer to it and copy and paste it directly.

You can also refer to this article of mine, install Ubuntu 20.04 and graphical interface on Windows 10, the link is as follows:

https://editor.csdn.net/md/?articleId=114285206

The source source used by me

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://archive.ubuntu.com/ubuntu/ bionic universe
deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security main restricted
deb http://security.ubuntu.com/ubuntu/ bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security universe
deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu/ bionic-security multiverse
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

2.1 install tcsh

sudo apt-get install tcsh

2.2 Install libx11-dev

sudo apt-get install libx11-dev

2.3 Install gfortran-6

2.3.1 Because Gamit10.7 can only use gfortran-6, only gfortran-6 is installed


sudo apt-get install gcc-6 gcc-6-multilib g++-6 g++-6-multilib gfortran-6 gfortran-6-multilib

然后使用如下命令创建指向 gfortran-6 的软链接:

       cd /usr/bin
       sudo ln -s gfortran-6 gfortran

2.3.2 If multiple versions are installed, you need to switch, the following is the installation and switching of multiple versions

    1.1 gcc g++ gfortran多版本切换(安装gamit需要切换低版本)

        **1.1.1安装gcc g++ gfortran多版本**

        sudo apt-get install gcc-5 gcc-5-multilib g++-5 g++-5-multilib gfortran-5 gfortran-5-multilib

        sudo apt-get install gcc-6 gcc-6-multilib g++-6 g++-6-multilib gfortran-6 gfortran-6-multilib

        sudo apt-get install gcc-7 gcc-7-multilib g++-7 g++-7-multilib gfortran-7 gfortran-7-multilib
        

        **1.1.2 设置gcc g++ gfortran优先级**

        sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 70

        sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60

        sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50

        sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 70

        sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 60

        sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 50

        sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-5 70

        sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-6 60

        sudo update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-7 50
        

        **1.1.3 选择gcc和g++ gfortran版本**

        sudo update-alternatives --config gcc

        sudo update-alternatives --config g++

        sudo update-alternatives --config gfortran

2.4 install csh

sudo apt-get install csh

2.5 Install ncftp

sudo apt-get install ncftp

2.6 install gmt

sudo apt-get install gmt

2.7 install make

sudo apt-get install make

2.8 install ftp

sudo apt-get install ftp

2.9 install curl

apt-get install curl

3. Install GAMIT/GLOBK

3.1 The software installation directory is as follows:

C:\Users\Administrator\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs\opt

insert image description here

3.2 Assign permissions to the installation package

First copy the decompressed gamit10.70 installation package to the desktop, then move to the /opt directory, and enter the command on the desktop:

mv gamit10.70 /opt/

Use the cd command to enter the /opt/gamit10.70 directory and execute the command:

sudo chmod 755 -R gamit10.71

This command modifies the permission of the install_software file to be executable.

3.3 GAMIT/GLOBK installation

3.3.1 Enter the gamit folder and execute the installation script, which is shown in the red box below:

./install_software

insert image description here
insert image description here

3.3.2 At this point, enter n. Open the Makefile.config file under the libraries folder, and edit it with the gedit command.

#Generic (will work on any system if links in place)

X11LIBPATH /usr/lib/X11

X11INCPATH /usr/include/X11

Modify it to
Generic (will work on any system if links in place)

X11LIBPATH /usr/lib/

X11INCPATH /usr/include/

After modification, it looks like this:
insert image description here
3.3.3 Then find:

MAXSIT 80

MAXSAT 32

13

MAXEPC 2880

Here is the configuration of the calculation parameters of the GAMIT program, it is recommended to modify as

MAXSIT 99

MAXSAT 32

32

MAXEPC 5760

After modification, it looks like this:
insert image description here

3.3.4 Still need to find

#—– for Linux from 0.0.1 to 3.9.5.3 – #

OS_ID Linux 0001 3953

Change the 4 digits after "0001" (3953 here) to the first 4 digits of the version number of your Linux system kernel. To view the Linux kernel version of the system, you can use the command:

uname -a

As shown on my computer
insert image description here
, then I should modify the corresponding part of the Makefile.config file as:

—– for Linux from 0.0.1 to 3.9.5.3 – #

OS_ID Linux 0001 4401
insert image description here

3.3.5 After changing the above content, save it. Re-run:

   ./install_software

After that, enter y for all questions, and if it is configured according to the previous steps, it will give a green light all the way.
At this time, if the system still prompts:
No i86 compiler specification–assuming gfortran (gcc 4.2x),
this is a problem with the gcc environment. Don’t worry about it, just let it install itself, and the installation will be successful in about 20 minutes.

3.3.6 After the installation is successful, you will see a prompt:

++++++++++++++++

GLOBK installed

++++++++++++++++

3.3.7 The system will prompt as follows:

Create the gg link in your home directory to the version of

gamit/globk you just installed ? (y/n)

Enter y, and the gg folder link is automatically created as follows

y

Making required ~/gg link to newly installed software

ln -s -f /opt/gamit10.70 ~/gg

Don’t forget to set your : path to include /opt/gamit10.70/gamit/bin and /opt/gamit10.70/kf/bin

HELP_DIR environment variable in you shell profile

(in .cshrc/.tcshrc add: setenv HELP_DIR /opt/gamit10.70/help/)

INSTITUTE evnironment variable in your shell profile

(in your .cshrc/.tcshrc add: setenv INSTITUTE where_i_work)

where_i_work is a 3 character identifier for your solutions

Note: This directory needs to be recorded, and soft connections will be made in the subsequent bash environment configuration.
At this point, Gamit/Globk installation is complete!

4 csh and bash configuration environment variable running path

4.1 csh environment variable running path configuration

After testing, it is found that after this step is configured, doy cannot be used in the csh environment, and it can be used again after restoring the previous state. You should consider whether to configure this csh environment as appropriate. It is recommended to configure bash first, and csh can be used automatically after bash is configured.

4.1.1 Enter the etc folder, (for safety reasons, copy and back up csh so that parameters can be restored after incorrect modification)

 cd /etc
gedit csh.cshrc

4.1.2 Add the following code at the bottom:

set gg = /opt/gamit10.71

setenv PATH “gg/gamit/bin:gg/kf/bin:gg/com:PATH”

setenv HELP_DIR $gg/help/
insert image description here
4.1.3 Then run the following code:

source ~/.cshrc

Then save.

4.2 bash environment variable running path configuration

4.2.1 Enter the bash directory and run it (for safety reasons, copy and backup bash so that parameters can be restored after incorrect modification).

cd /home/
gedit ~/.bashrc

insert image description here
4.2.2 Add the following code at the bottom (note: the path will be prompted when the gg link is created after installation, and the gg directory in 3.3.7 is used here):

gg="/opt/gamit10.71"

export PATH=“ g g / g a m i t / b i n : gg/gamit/bin: g g / g a m i t / b i n:gg/kf/bin: g g / c o m : gg/com: gg/com:PATH”

export HELP_DIR=$gg/help/
insert image description here
4.2.3 Save, and then run the following code:

source ~/.bashrc

5 Successful installation test in csh and bash environment

5.1 Test in bash environment

Directly enter bash to switch directly

bash

5.1.1 Input doy

doy

insert image description here
5.1.2 Enter sh_get_rinex

sh_get_rinex

insert image description here
5.1.3 Enter sh_gamit -v

sh_gamit -v

insert image description here
The above three commands have feedback, indicating that the installation is successful!

5.2 Test in csh environment

5.1.1 Input doy

doy

insert image description here

5.1.2 Enter sh_get_rinex

sh_get_rinex

insert image description here

5.1.3 Enter sh_gamit -v

sh_gamit -v

insert image description here
The above three commands have feedback, indicating that the installation is successful!

5.1.4 Environment variable configuration

 export PATH=/usr/bin:/bin

6. Reference blog post thanks

The blog posts referenced in this article are thanks to the experience provided by the bloggers.
http://blog.sciencenet.cn/blog-858128-1225514.html
http://wap.sciencenet.cn/blog-508171-1234890.html
https://blog.csdn.net/u011322358/article/details/ 104246181
https://blog.csdn.net/lomefeit/article/details/108637740?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&depth_1-utm_source.pc_distribute -task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control

Guess you like

Origin blog.csdn.net/u011322358/article/details/117953082