Tag Archives: linux

package xxx does not exist cannot find symbol

When deploying services on Linux, a large number of packages were thrown and no exception was found

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/UserServiceImpl.java:[3,28] package com.alibaba.fastjson does not exist

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/User.java:[9,2] cannot find symbol

[ERROR]   symbol: class Data

[ERROR]   location: class com.xxx

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/User.java:[3,14] package lombok does not exist

[ERROR] /home/jenkins/agent/workspace/pipeline_p-h6sbk-4/src/main/java/com/User.java:[9,2] cannot find symbol

[ERROR]   symbol: class Data

[ERROR]   location: class com.xxx

[ERROR] -> [Help 1]

[ERROR] 

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR] 

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

This is Maven’s problem

    check whether the settings.xml file is configured. Check & lt; in the settings.xml file; localRepository> If the path is configured correctly, & lt; mirror> Whether the image address is correct and the network is unblocked. Whether the jar package and the corresponding version exist in Maven warehouse. Whether the Maven version configured in pom.xml corresponds to the Linux Installation version

Error installing redis: redis requires Ruby Version > = 2.3.0

Error installing redis: redis requires Ruby Version & gt= 2.3.0.

Error installing redis: redis requires Ruby Version & gt= 2.3.0.

Recently, the following error was reported when installing redis cluster:
the version of ruby in centos7 Yum library supports 2.0.0, but gem needs at least 2.3.0 to install redis, and uses RVM to update ruby

Follow the steps below

1. Install curl

yum -y install curl

2. Install RVM

curl - L get.rvm.io | bash - s stable
this is an installation failure error

this situation mostly occurs in self signed certificates. The error report means that the issuing certificate authority is not authenticated and cannot be identified.

3. Modify hosts

VI/etc/hosts
add the following
199.232.28.133 raw.githubusercontent.com

4. Execute curl command and download RVM

curl - L get.rvm.io | bash - s stable

Load shell configuration
source/usr/local/RVM/scripts/RVM

5. Check the known Ruby versions in RVM library

rvm list known

6. Install the ruby version

rvm install 2.6.3

7. Use Ruby Version

rvm use 2.6.3

8. Set the default version

ruby --version

9. Uninstall the old version

rvm remove 2.0.0

10. Install the interface version of redis and ruby

gem install redis

This is the perfect solution~

[extremely simple and effective] installing docker under centos6. X

1. Upgrade Linux kernel

    rpm –import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

 

    rpm -Uvh http://www.elrepo.org/elrepo-release-6-8.el6.elrepo.noarch.rpm     

 

    yum –enablerepo=elrepo-kernel install kernel-lt -y

2. Modify default startup order

   vim /etc/ grub.conf

Restart the server

shutdown -r now

3. Disable SELinux

4. Offline installation of docker with static binary files

reference resources https://docs.docker.com/install/linux/docker-ce/binaries/#install -static-binaries

This installation method is the most simple and correct, the rest of the online reference rpm, yum installation all have a variety of problems.

 

1. Download static binary file

go to https://download.docker.com/linux/static/stable/ (or change stable to edge or test), select your hardware platform, and then download. Tgz files related to the docker CE version to be installed.

 

2. Decompress

$ tar –xzvf docker-18.06.3- ce.tgz For this, please install it on demand

Required: move the binary file to a directory on the executable path, such as/usr/bin /.

——–Without this step, it is invalid to call docker under the docker file

$ sudo cp docker/* /usr/bin/

3. Start the docker daemon:

$ sudo dockerd&

Note: if the following error occurs when starting the daemons:

The reason is that CGroup is not mounted on the host computer. To add a mount, the solution is as follows:

vim /etc/fstab

none        /sys/fs/cgroup        cgroup        defaults    0    0

Save and restart.

4. Start the docker command test

docker -v

No repositories directory found inside registry_ DATA_ DIR

No repositories directory found inside registry_ DATA_ DIR

Registry uses delete_ docker_ registry_ Solution 1: modify the global configuration file solution 2: modify the third-party plug-in

Registry uses delete_ docker_ registry_ Image delete image

Delete the specified image:
/usr/local/bin/delete_ docker_ registry_ Image - I image name delete the specified image label:
/usr/local/bin/delete_ docker_ registry_ Image - I image name: label

Delete error

REGISTRY_ DATA_ Dir is the directory corresponding to the private library file mapped to the local volume

[root@bigdata ~]# delete_docker_registry_image --image ssh-web-console:latest
No repositories directory found inside REGISTRY_DATA_DIR /opt/registry_data/docker/registry/v2

Solution 1: modify the global configuration file

This method is suitable for using delete on the server_ docker_ registry_ Image three party plug-in for image deletion of docker private library

[root@bigdata ~]# vim /etc/profile
'''
export REGISTRY_DATA_DIR=/data/docker/registry/docker/registry/v2
"/etc/profile" 86L, 2182C 

Solution 2: modify the third-party plug-in

This method is applicable to the server, and it is also applicable to delete when calling shell command with background service_ docker_ registry_ Image three party plug-in for image deletion of docker private library

[root@bigdata ~]# vim /usr/local/bin/delete_docker_registry_image
'''
	if 'REGISTRY_DATA_DIR' in os.environ:
        registry_data_dir = os.environ['REGISTRY_DATA_DIR']
    else:
        registry_data_dir = "/root/data/registry/docker/registry/v2"//Here is the path to your own mirror repository
 
    try:
        cleaner = RegistryCleaner(registry_data_dir, dry_run=args.dry_run)
        if args.untagged:
            cleaner.delete_untagged(image)
        else:
            if tag:
                cleaner.delete_repository_tag(image, tag)
            else:
                cleaner.delete_entire_repository(image)
 
        if args.prune:
            cleaner.prune()
    except RegistryCleanerError as error:
        logger.fatal(error)
        sys.exit(1)
 
 
if __name__ == "__main__":
    main()

About the problem that Ubuntu kylin can’t locate the package update

First, log in as root with the terminal

sudo -i

Then switch to the/etc/apt/directory and execute:

cd /etc/apt/

Put the inside sources.list Copy it for security.

cp sources.list sources.list1

The next step is to open it with vim sources.list , delete the original contents, and then add the following contents:

deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse

deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse

Finally, execute: apt get update.

CentOS install therapee and LibTiff

cd '/etc/yum.repos.d/'

curl 'https://copr.fedorainfracloud.org/coprs/scx/libtiff4/repo/epel-7/scx-libtiff4-epel-7.repo' > 'scx-libtiff4-epel-7.repo'

curl 'https://copr.fedorainfracloud.org/coprs/scx/rawtherapee/repo/epel-7/scx-rawtherapee-epel-7.repo' > 'scx-rawtherapee-epel-7.repo'

yum install 'rawtherapee'

Reference
source

The solution of no module named ‘jinja2. Asyncsupport’

Background of the problem

When compiling Px4,

make px4_sitl_default gazebo

An error has been reported,

[0/535] Performing build step for 'sitl_gazebo'
[1/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/mb1240-xl-ez4/mb1240-xl-ez4.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[2/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/pixhawk/pixhawk.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[3/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/matrice_100/matrice_100.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[4/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/r200/r200-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/r200/r200.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[5/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/c920/c920-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/c920/c920.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[6/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/px4flow/px4flow.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[7/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/3DR_gps_mag/3DR_gps_mag.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[8/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a-gen.sdf 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/sf10a/sf10a.sdf.jinja /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo
Traceback (most recent call last):
  File "/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/jinja_gen.py", line 4, in <module>
    import jinja2
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 82, in <module>
    _patch_async()
  File "/usr/lib/python2.7/dist-packages/jinja2/__init__.py", line 78, in _patch_async
    from jinja2.asyncsupport import patch_all
ModuleNotFoundError: No module named 'jinja2.asyncsupport'
[9/9] Generating /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf
FAILED: /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf 
cd /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo && rm -f /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/scripts/xacro.py -o /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.xacro enable_mavlink_interface:=true enable_ground_truth:=false enable_wind:=false enable_logging:=false rotors_description_dir:=/home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description send_vision_estimation:=true send_odometry:=false && gz sdf -p /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf >> /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/iris/iris.sdf && rm -f /home/zth/catkin_ws/Firmware/Tools/sitl_gazebo/models/rotors_description/urdf/iris_base.urdf

gz: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgazebo_common.so.9: undefined symbol: _ZN8ignition10fuel_tools12ClientConfig12SetUserAgentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE
ninja: build stopped: subcommand failed.
[2/535] Generating mixer_multirotor.generated.h
FAILED: src/lib/mixer/MultirotorMixer/mixer_multirotor.generated.h 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/mixer/MultirotorMixer && /usr/bin/python3 /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tools/px_generate_mixers.py -f /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_bottom_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_top_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_t.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_deadcat.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_h.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_s250aq.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_vtail.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_cw.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_pusher.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tri_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/twin_engine.toml -o mixer_multirotor.generated.h
Failed to import numpy: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'


You may need to install it using:
    pip3 install --user numpy

[3/535] Generating mixer_multirotor_normalized.generated.h
FAILED: src/lib/mixer/MultirotorMixer/mixer_multirotor_normalized.generated.h 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/mixer/MultirotorMixer && /usr/bin/python3 /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tools/px_generate_mixers.py --normalize -f /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_bottom_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_top_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_t.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_deadcat.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_h.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_s250aq.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_vtail.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_cw.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_pusher.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tri_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/twin_engine.toml -o mixer_multirotor_normalized.generated.h
Failed to import numpy: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'


You may need to install it using:
    pip3 install --user numpy

[4/535] Generating mixer_multirotor_6dof.generated.h
FAILED: src/lib/mixer/MultirotorMixer/mixer_multirotor_6dof.generated.h 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/mixer/MultirotorMixer && /usr/bin/python3 /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tools/px_generate_mixers.py --sixdof -f /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_bottom_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/dodeca_top_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_t.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/hex_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_cox_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/octa_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_deadcat.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_h.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_plus.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_s250aq.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_vtail.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_wide.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_cw.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_x_pusher.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/quad_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/tri_y.toml /home/zth/catkin_ws/Firmware/src/lib/mixer/MultirotorMixer/geometries/twin_engine.toml -o mixer_multirotor_6dof.generated.h
Failed to import numpy: 
Importing the multiarray numpy extension module failed.  Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control).  Otherwise reinstall numpy.

Original error was: cannot import name 'multiarray'


You may need to install it using:
    pip3 install --user numpy

[5/535] Generating serial_params.c
FAILED: generated_params/serial_params.c 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/src/lib/parameters && /usr/bin/cmake -E make_directory /home/zth/catkin_ws/Firmware/build/px4_sitl_default/generated_params && /usr/bin/python3 /home/zth/catkin_ws/Firmware/Tools/serial/generate_config.py --params-file /home/zth/catkin_ws/Firmware/build/px4_sitl_default/generated_params/serial_params.c --serial-ports --config-files /home/zth/catkin_ws/Firmware/src/lib/battery/module.yaml /home/zth/catkin_ws/Firmware/src/drivers/gps/module.yaml /home/zth/catkin_ws/Firmware/src/modules/mavlink/module.yaml
Failed to import jinja2: No module named 'jinja2.asyncsupport'

You may need to install it using:
    pip3 install --user jinja2

FAILED: external/Stamp/sitl_gazebo/sitl_gazebo-build 
cd /home/zth/catkin_ws/Firmware/build/px4_sitl_default/build_gazebo && /usr/bin/cmake --build .
ninja: build stopped: subcommand failed.
Makefile:198: recipe for target 'px4_sitl_default' failed
make: *** [px4_sitl_default] Error 1

The first mistake is:

ModuleNotFoundError: No module named 'jinja2.asyncsupport'

Solution process:

1. Install jinja2 according to the command given in the error prompt:

zth@SugoAsurada:~/catkin_ws/Firmware$ pip install jinja2
Collecting jinja2
  Using cached https://files.pythonhosted.org/packages/30/9e/f663a2aa66a09d838042ae1a2c5659828bb9b41ea3a6efa20a20fd92b121/Jinja2-2.11.2-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2)
  Downloading https://files.pythonhosted.org/packages/fb/40/f3adb7cf24a8012813c5edb20329eb22d5d8e2a0ecf73d21d6b85865da11/MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl
Installing collected packages: MarkupSafe, jinja2
Successfully installed MarkupSafe-1.1.1 jinja2-2.11.2

The version of jinja2 installed with this command is 2.11.2.
In ~ / catkin_ View the version of jinja2 under the directory WS / firmware,

zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
>>> jinja2.__version__
'2.10'
>>> exit()

The resulting version is 2.10.
Obviously, jinja2 was not installed in the path we needed.

2. Check the location of jinja2 in the current path, and find the cause of the problem

zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
>>> jinja2.__file__
'/usr/lib/python2.7/dist-packages/jinja2/__init__.pyc'
>>> exit()

After coming to the directory ‘/ usr / lib / python2.7/dist-packages/jinja2’, I found that there are no files in the directory asyncsupport.py . The PY file is missing from the official website.

3. Delete jinja2 from the specified directory and install a new jinja2

Unload command:

sudo  rm -r /usr/lib/python2.7/dist-packages/jinja2

Output results:

zth@SugoAsurada:~/catkin_ws/Firmware$ sudo  rm -r /usr/lib/python2.7/dist-packages/jinja2
zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named jinja2
>>> exit()

Installation command:

sudo pip install jinja2 --target=/usr/lib/python2.7/dist-packages

Inspection output:

zth@SugoAsurada:~/catkin_ws/Firmware$ python
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
[GCC 7.5.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import jinja2
>>> jinja2.__file__
'/usr/lib/python2.7/dist-packages/jinja2/__init__.pyc'
>>> jinja2.__version__
'2.11.2'
>>> exit()

Solution of device eth0 does not see to be present, delaying initialization. Error in network card under Linux

Today, when I was practicing under Linux, I saw two network cards under the ifconfig command, one is the l0 network card, and the other is eth1. At the beginning, it was l0 and eth0. I don’t know how it became eth1, so I became obsessive-compulsive and deleted all network card configurations. As a result, when I restarted the network service, it was a tragedy…

First of all, let’s talk about the reason why my network card changed from eth0 to eth1: it was due to the previous operation error, and I didn’t know this before, so I followed the online tutorial. As a result, I configured eth0 to eht0, and the system couldn’t find it. Later, due to the configuration failure, I configured it once, and the result became eth1. Until today, I found this error…

Because I couldn’t change eth0, I saw that there was a tutorial on the Internet, but it didn’t work.. (I don’t know why.) so I deleted all the network card configuration with one hand. The steps are as follows:

First, stop the network service

1./etc/sysconfig/network scripts directory, delete the network card configuration that you want to delete. I want to delete eth1, so RM – RF ifcfg-eth1, and so on

2./etc/sysconfig/Networking/devices directory, delete all files, simple and easy

3./etc/sysconfig/Networking/profiles/default directory, delete all files related to eth1

After starting the network service, there should be only one l0 network card left, and the service is stopped

Write network card configuration file

1./etc/sysconfig/network scripts directory, write the configuration file with VI, here I name it ifcfg-eth0 (my eth0 is finally coming back)

The configuration is as follows:

DEVICE=eth0
ONBOOT=yes
IPADDR=172.168.0.108
BOOTBROTO=none
NETMASK=255.255.255.0
PREFIX=24

Here is a simple write a few configuration, complete configuration I can not remember, there is no need to remember. I found a more complete configuration on the Internet, you can have a look

DEVICE=eth0 #Indicates the device name
NM_CONTROLLED=yes #network mamager's parameter, effective in real time, no need to reboot
ONBOOT=yes #Set to yes to enable network connection automatically on power on
IPADDR=192.168.21.129 #IP address
BOOTPROTO=none # set to none to disable DHCP, set to static to enable static IP address, set to dhcp to enable DHCP service
NETMASK=255.255.255.0 #subnet mask
DNS1=8.8.8.8 #the first dns server
TYPE=Ethernet #Network type is: Ethernet
GATEWAY=192.168.21.2 #set gateway
DNS2=8.8.4.4 #second dns server
IPV6INIT=no #Disable IPV6
USERCTL=no #Whether to allow non-root user to control the device, set to no, can only be changed by root user
HWADDR=00:0C:29:2C:E1:0F #Mac address of the NIC
PREFIX=24
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
NAME="System eth0" #Define the device name

 

After I started the network service, I reported the error of device eth0 does not see to be present, delaying initialization. After searching on the Internet, I found that it was caused by the MAC address mismatch. There are two solutions

1. 70 persistent in/etc/udev/rules. D directory- net.rules File, open, modify the MAC address inside, and ifcfg-eth0 can be the same

2. Delete/etc/udev/rules.d/70-persistent directly- net.rules File, then restart, simple and crude

After restart, we will find that the network service can start normally, and the current network card is l0 and eth0

 

 

 

How to Solve Error: Driver “kvm2“ not found

This error occurred in the environment of Ubuntu 16.04. According to the official KVM installation mode, starting minicube still reported an error

curl -LO https://storage.googleapis.com/minikube/releases/v0.30.0/docker-machine-driver-kvm2
chmod +x docker-machine-driver-kvm2
sudo mv docker-machine-driver-kvm2 /usr/local/bin/

As above, after installing docker-machine-driver-kvm2 (note that the version should not be too new)

Sudo: unable to resolve host solution

When using the sudo command of Linux, some people may encounter such a problem: “sudo: can’t parse the host: xxxxx (your host name). I also encounter this problem. I have found a solution on the Internet and share it with you here.

This problem is caused by the hosts file is not well configured, Linux can not resolve to your host address, the solution is as follows:

sudo vim /etc/hosts

VIM is the command of your text editor. If you don’t have VIM in your computer, you can use GEDIT.

After opening the file, the

127.0.1.1  xxxxx

The following XXX is replaced by your computer host name, which is the last string of characters in the error. If not, add it in. If there are many parts of soybean oil, they can be replaced in batches.

Article link: sudo: unable to resolve host solution