The whole process of linux system installation-3

This article continues the entire Linux system installation process -1 and -2  , and describes other operations for installing the system.

7: Install ssh operation,

Otherwise, it will be too troublesome to log in.

Direct connection failed, install ssh

sudo apt-get install openssh-server

Then check if it is ok

ps -e|grep ssh

If you have ssh-agent and sshd , it will be fine. If there is no sshd , you need to start it manually:

/etc/init.d/ssh start

Then you can log in via ssh .

8: Check ubuntu and kernel version

When installing some software, you need to  download the specified software version based on the specific version number of Ubuntu . So how can you know  which version of the Ubuntu system you are using? Use the lsb_release command that comes with the system

 View kernel version

After installing Ubuntu 16.04.7 LTS, the prompt is as follows:

9: Install SVN

If you directly use SVN to checkout, you will be prompted to install subversion. Directly:

Sudo apt install subversion

You may need to restart after that, and then you can checkout directly.

10: Install tool chain

Compilation also requires a tool chain. Copy the tool chain from another server. The method is to package the compressed tool chain file into the following two files:

nuc972-arm-linux-tools.tar.gz //This is one of the tool chains

ti-toolchain.tgz //Another tool chain

Then unzip:

Sudo tar zxvf nuc972-arm-linux-tools.tar.gz –C /

Then export environment variables

Export PATH=$PATH:/host/opt/ext-toolchain/bin/

The command arm-none-linux-guneabi-g++ can then be automatically completed.

But an error occurred when compiling the program, prompting: command nuc972- arm-none-linux-guneabi-g++ does not exist

It can be automatically completed, so how could it not exist?

Go to the /host/opt/ext-toolchain/bin/ directory and directly execute arm-none-linux-guneabi-gcc –v

提示:- bash arm-none-linux-guneabi-gcc no such file or directory

Don't have this file? ? ?

Unable to execute, check the network instructions, there are several explanations:

1: Spelling errors, spaces/Unicode encoding…

This is obviously not the case because it is not in Chinese.

2: Permission error, insufficient execution permissions

Adjust the permissions and compare the executable file arm-none-linux-guneabi-gcc with the arm-none-linux-guneabi-gcc of other Linux computers. They have the same size and the same execution permissions.

3: The /etc/profile configuration file is wrong

If the file is abnormal, it may cause other commands except basic commands to be unable to be executed. For example, if only the cd command can be executed, it does not apply here. Here is a comparison:

export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

Then add Export PATH=$PATH:/host/opt/ext-toolchain/bin/

Still unable to execute

4: The last possibility is the file format.

Yes, if Linux is a 64-bit system, it cannot directly execute 32-bit programs. Obviously our computer is 64-bit by default, but our execution file is 32-bit. At this time, you need to manually install a 32-bit runtime Library:

Cat /etc/issue

Uname –a //You can see that the system is x86-64

And pass

File arm-none-linux-guneabi-gcc

You can see that the file is 32bit.

Therefore, you need to install a 32bit runtime library

sudo apt-get install ia32-libs

Reading package lists... Done

Building dependency tree      

Reading state information... Done

Package ia32-libs is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or

is only available from another source

However the following packages replace it:

  lib32z1 lib32ncurses5 lib32bz2-1.0

As recommended, install a

Sudo apt-get install lib32ncurses5

Once completed, arm-none-linux-guneabi-gcc –v

Execution is normal! !

11: Configure environment variables

In order to ensure that there is no need to manually export the configuration environment variables after each startup, configure the Linux environment variables as follows:

View the /etc/profile file

Every time it is started, the sh file will be found under the /etc/profile.d folder for execution, so I placed a file under /etc/profile.d as follows:

 A cegn-profile.sh file is placed. This file exports the relevant environment variables, so that it will be automatically executable every time the system starts.

12: Install Qt compilation environment

When compiling Ti's project, it prompts a UI file compilation problem. When compiling the ui file directly, it prompts that the qt library file cannot be found. Qt is searched on the old compiler, in /home/tcu/opt/

Compress the qt-related libraries under /home/tcu/opt/, copy them to the local machine, and decompress them into the relevant directories of /opt/…. Then modify the environment variables. After completion, compile the ui directory of the Ti project. At this time, it actually prompts that the library libstdc++.so.6 cannot be found.

Then try installing:

 Then try updating: apt-get update

When executing this command, the final message appears:

 Is there something wrong with the source? I modified the update source to the Alibaba server, but then the update still prompted an exception.

 Later, I tried to find that all apts failed, so I followed the online solutions.

sudo rm /var/cache/apt/*.bin
sudo apt-get -update
sudo apt-get –upgrade

Still failed

The analysis is also caused by the previous installation of lib32ncurses5. The installation of lib32ncurses5 is directly installed on the system, replacing the system's lib32ncures5 library, and all the programs that rely on it have problems running.

The processing method is still step 10. In fact, as long as step 10 is processed ok, there is no problem with this step. The final problem is that running 32bit programs on 64bit systems requires 32bit libraries. At the same time, 32bit libraries cannot replace the existing 64bit libraries. , so as long as sudo apt- get install ia32-libs is executed in 10 , there will be no problem here.

But what should I do if this abnormal problem has already occurred? There is no other way. Just reinstall it again (I have reinstalled it at least 3 times. The first time it works, the second time it is familiar).

 

Guess you like

Origin blog.csdn.net/weixin_45119096/article/details/130069183