Tag Archives: linux

Installing docker on Huawei Kunpeng server arm64

Installing docker on Huawei Kunpeng server arm64

 


 

1、 Download of installation package

The required version of the installation package can be downloaded according to the actual needs

https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/arm64/

2、 Installation procedure

1. Download the installation package

wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/arm64/containerd.io_1.2.6-3_arm64.deb

wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/arm64/docker-ce_19.03.8~3-0~ubuntu-xenial_arm64.deb

wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/arm64/docker-ce-cli_19.03.8~3-0~ubuntu-xenial_arm64.deb

 

2. Installation

Enter the location where the installation package is downloaded and install it

dpkg -i *.deb

Set boot up

systemctl enable docker

Start docker service

systemctl start docker

View docker status

systemctl status docker

 


Add executable permissions to Linux files

Some executable files under Linux, such as. Sh ending, etc;

If we want to run such a file, we need to add an executable permission to the file;

Otherwise, this file cannot be executed.

We use VI to build a tomcat.sh File, command ll view

You can see here that there is no executable permission.

Next, we need to use the Chmod command. Let’s take a look at the help information of the Chmod command.

Enter Chmod — H
to enter Chmod — H

Then we add the executable permission
Chmod 777 tomcat.sh

In executing the LL command, make a comparison with before

Then it’s ready to run

Springboot error, unable to read configuration file: could not resolve placeholder ‘xxx’ in value “${XXX}

Just configure the following code on the startup class

@Bean
    public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() {

        PropertySourcesPlaceholderConfigurer placeholderConfigurer = new PropertySourcesPlaceholderConfigurer();

        placeholderConfigurer.setIgnoreUnresolvablePlaceholders(true);

        return placeholderConfigurer;
    }

should be OK

The solution of undefined reference to error

Chen Yunwen

 

When compiling programs under Linux, we often encounter “undefined reference to XXX” error,

Here is a summary of some possible reasons and solutions for those in need:

 

Speaking of undefined reference error, let’s first mention the link rules of Linux GCC

 

The search order of links is as follows:

 

    – L to find the path specified by the environment variable library from left to right_ Path, use the ‘:’ partition to find / etc from left to right/ ld.so.conf The specified path order is / lib and / usr / lib (64 bit is / lib64 and / usr / lib64)

Search order of dynamic library calls:

 

The path specified by the – rpath parameter of

    LD is the path specified by the LD script that is written dead in the code_ LIBRARY_ Path / etc/ ld.so.conf The specified paths / lib and / usr / lib (64 bit is / lib64 and / usr / lib64)
are

In general, we use the – L method to specify the search path when linking, and use LD when calling dynamic link library_ LIBRARY_ Path to specify the link path

Another problem to note is that as long as the first one is found, it will be returned, and the later ones will not be found. For example, – L. / a – L. / B – LX has libx in a, libx. A and libx. A in B libx.so In this case, libx. A in. / a will be used instead of following the principle of dynamic library priority, because. / A is found first and there is no dynamic inventory with the same name in

 

 

For dynamic link library, the actual symbol positioning is carried out at run time. When compiling. So, if the library it needs is not associated with it, such as libx.so You need to use uldict, But forget to compile libx.so Add – luldit when compiling libx.so I won’t make a mistake when I’m here, because at this time libx.so It is considered as a library, in which there are some symbols that do not know the specific implementation, which are legal and can be specified at runtime or when compiling other binary programs

If G + + – lpath – LX is used The linker will find that the required uldict symbol table can not be found and report an error. However, if the program is loaded in dlopen mode, the program will run directly in this place and report an error because it is in runtime. Another case is that an external interface has been declared and defined in the dynamic library, but it has forgotten to implement it. At this time, the Similar mistakes can occur

If such an error is reported in the runtime, we should pay attention to whether it is due to the fact that some libraries are not linked or some interfaces are not implemented

 

 

With the above foundation, it is not difficult to see that the reasons for the undefined reference error are as follows:

    no corresponding library (. O /. A /. So) uses the entity defined in the library, but no library (- LXXX) or library path (- lyyy) is specified, which will lead to this error. The order of connecting library parameters is not right. By default, the more basic the library is, the more it should be written later, Whether it is static or dynamic, the version of GCC / LD does not match the compatibility of the version of GCC / LD. Due to the compatibility problems of the large versions of GCC 2 to GCC 3 (in fact, there are some problems in GCC 3.2 to 3.4), when using the low version of the machine on the high version machine, such errors will be caused. This problem is more common in the 32-bit environment, In addition, the 64 bit library is used carelessly in the 32-bit environment, or vice versa. The C / C + + interdependence and the mixed use of linking GCC and G + + compilation results need to ensure that both sides of extern “C” can use the interface. In our 64 bit environment, the GCC linking G + + library also needs to add – lstdc + +, For details, please refer to the description of hybrid compilation in the previous article. The problem of runtime error is basically due to the program using dlopen mode to load. So, but. So does not link all the required libraries. Please refer to the description of hybrid use of static library and dynamic library in the above section

     

Solutions for permission denied

Get an installation file that ends with. Run and give it executable permission. If the SELinux module is enabled, please disable it first!

For example:

# chmod +x NVIDIA-Linux-x86_ 64-295.59.run

When pasting files to a directory (myresources), such a prompt appears

Permission denied

The permission is not set, just copy and paste a file, how can it be like this?

solutions:

$ sudo chmod -R 777 myResources

Among them,
– R refers to all subdirectories and files cascaded to the directory,
777 means that all users have the highest permissions

ROS package ROS_ astra_ Camera cannot open RGB lens

ROS package ROS_ astra_ Camera cannot open RGB lens

https://github.com/orbbec/ros_ astra_ Camera
the official document mentions opening depth and RGB lens with the following command:
roslaunch Astra_ camera stereo_ s.launch

After executing the above command, use rqt_ image_ View can see the depth image, but not the RGB image, and an error is reported:
[camera / stereo]_ s-2] process has died [pid 8255, exit code 255, cmd /home/riki/gxb_ workspace/devel/lib/astra_ camera/camera_ node /camera/image_ raw:=/camera/rgb/image_ raw __ name:=stereo_ s __ log:=/home/riki/.ros/log/071dba06-7bcb-11eb-a85a-000c293dff09/camera-stereo_ s-2.log].
log file: /home/riki/.ros/log/071dba06-7bcb-11eb-a85a-000c293dff09/camera-stereo_ s-2*.log

The solution: open stereo_ s. In the launch file, change the value in this line to your device’s camera number. For example, my device’s camera number is 0x0502, so you can open the RGB lens.

The camera number can be viewed through lsusb command:
gxb_ workspace/src/ros_ astra_ camera/launch$ lsusb
Bus 001 Device 004: ID 2bc5:0403
Bus 001 Device 003: ID 2bc5:0502
Bus 001 Device 002: ID 04f2:b64f Chicony Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 004: ID 0e0f:0008 VMware, Inc.
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Nginx modifies the front end request size limit (413 request entity too large)

During use of NGINX, if the request message is too large in the front-end POST request, it is usually necessary to increase the value of the client_max_body_size property, which defaults to 1M. Avoid 413 Request Entity Too Large.
You can optionally set it in HTTP {} : client_max_body_size 20m; Controls all requests received by NGINX
You can also optionally set it in Server {} : client_max_body_size 20m; Controls the requests received within the server
You can also optionally set client_max_body_size 20m in Location {}; Controls the request that matches the routing rules of Location

Float: 99: input / output error appears in vscode SSH plug-in

Flock: 99: Input/ Output error in VSCode SSH plugin

The SSH plugin for VSCode will get lock under ~/.vscode-server by default, but on some servers mounted on NFS the flock: 99: Input/output error
Solution is to acquire the lock, under/TMP In SSH plugin Settings selected LockFiles In Temp, or search remote. SSH. LockfilesInTmp can find this setting.
Reference: http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference

Tdengine failed to start, start request repeated too quickly for taosd.service

When you disable TDEngine, you will be presented with Start Request (as evidenced by Too Quickly for Taosd.service)

The solution
Edit taosd.service and look at the prompts. Line 3 of the image above. Loaded: Loaded follows

vim /etc/systemd/system/taosd.service

Modify StartLimitBurst = 0

[Unit]
Description=TDengine server service
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/taosd
ExecStartPre=/usr/local/taos/bin/startPre.sh
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TimeoutStartSec=0
StandardOutput=null
Restart=always
StartLimitBurst=0
StartLimitInterval=60s

[Install]
WantedBy=multi-user.target

Launch OK again