Tag Archives: ubuntu

Solutions to remote or adding SSH key errors

 

 

Method 1

ssh-keygen -R XX.XX.XX.XX  

Method 2

【1】 Delete the corresponding IP in known_ Hosts related information

vim /.ssh/known_ hosts

The problem is solved. The reason is that after the system is reinstalled, the remote connection is made again. After entering yes, this opportunity writes the information of the remote machine to/users/Wangdong /. SSH/known_ Hosts file, so if you reinstall the system remotely, you must clean up the machine first.

Error reporting using NVIDIA SMI

Error reporting using NVIDIA SMI:

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running

This is a common problem, which often occurs in Ubuntu systems. The main reason is that the system kernel has been upgraded, resulting in the mismatch between the new kernel and the original graphics card driver

Solution 1:

Just execute two commands:

Sudo apt get install DKMS
sudo DKMS install – M NVIDIA – V 440.44 (440.44 indicates the driver version number)

Use the command ll/usr/SRC/to view the nvidia-440.44/ folder below. The version number varies from computer to computer
 

[Solved] ERROR: error loading sources list: The read operation timed out

During the installation of ROS platform under Ubuntu 20.04 system, an error is reported during the initialization of rosdep

rosdep update

Super times error

reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: error loading sources list:
	The read operation timed out

When you execute rosdep update according to the method in this article, there is still a timeout error, and you think of adding it directly in sources. List. D https://ghproxy.com/ Prefix, as follows:

Connect the mobile phone hotspot and open the terminal for execution

sudo vim /etc/ros/rosdep/sources.list.d/20-default.list

Modify list content

# os-specific listings first
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

Then run rosdep update to solve the problem.

[email protected]:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Add distro "galactic"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/ubuntu/.ros/rosdep/sources.cache

AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘ [How to Solve]

The error details are as follows:

Traceback (most recent call last):
  File "/usr/local/bin/evo_traj", line 5, in <module>
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 62, in apport_excepthook
    if not enabled():
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Original exception was:
Traceback (most recent call last):
  File "/usr/local/bin/evo_traj", line 5, in <module>
    import re
  File "/usr/lib/python3.6/re.py", line 142, in <module>
    class RegexFlag(enum.IntFlag):
AttributeError: module 'enum' has no attribute 'IntFlag'

Problem analysis
this problem has not occurred before. It is suspected that the python iteration version conflict is caused by the update of Ubuntu system. It is recommended to turn off the automatic update of Ubuntu to prevent such problems. It takes a long time to solve some version conflict problems.

Solution:
the query found that pythonpath was set incorrectly. The configuration left by the previous use of python2 was saved in. Bashrc, resulting in python3 unable to find the correct enum location. After commenting out the relevant statements in bashrc, clear the $pythonpath variable:

 unset PYTHONPATH
 echo $PYTHONPATH

Then it can be used normally. Pythonpath is a multi-purpose configuration in python2. It is generally no longer needed after using python3.

[Solved] Error: Another program is already listening on a port that one of our HTTP servers is configured to

Question

    1. Step 1 run
supervisord  -c /etc/supervisor/supervisord.conf

Error

Error: Another program is already listening on a port that one of our HTTP servers is configured to

Solution:

ps -ef | grep supervisord

Turn off the 8079 process

kill -s SIGTERM 8079  

Solution results

supervisord  -c /etc/supervisor/supervisord.conf

No error is the best case, indicating that the process is started successfully

ros2 apt-get install error: E: Failed to fetch http://packages.ros.org…

version: foxy

apt install

sudo apt-get install ros-foxy-serial-driver 
[sudo] password for mi: 
Sorry, try again.
[sudo] password for mi: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  ros-foxy-serial-driver
0 upgraded, 1 newly installed, 0 to remove and 769 not upgraded.
Need to get 9,508 B of archives.
After this operation, 61.4 kB of additional disk space will be used.
Err:1 http://packages.ros.org/ros2/ubuntu focal/main amd64 ros-foxy-serial-driver amd64 0.0.6-1focal.20210423.022509
  404  Not Found [IP: 64.50.233.100 80]
E: Failed to fetch http://packages.ros.org/ros2/ubuntu/pool/main/r/ros-foxy-serial-driver/ros-foxy-serial-driver_0.0.6-1focal.20210423.022509_amd64.deb  404  Not Found [IP: 64.50.233.100 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Apt update error:

W: An error occurred during the signature verification.
 The repository is not updated and the previous index files will be used.
 GPG error: http://packages.ros.org/ros/ubuntu focal InRelease: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <[email protected]>

Solution:

 curl http://repo.ros2.org/repos.key | sudo apt-key add -

Ubuntu: Redis starts the project Error [How to Solve]

redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands that may modify the data set are disabled, because this instance is configured to report errors during writes if RDB snapshotting fails (stop-writes-on-bgsave-error option). Please check the Redis logs for details about the RDB error.

Cause: redis snapshot forced to close, resulting in the problem of not being able to persist
Solution.
1. Avoid this problem by setting the stop-writes-on-bgsave-error value to no.

Through the redis command line directly to change.
Go to the redis command line and execute: config set stop-writes-on-bgsave-error no

2. Change the stop-writes-on-bgsave-error value to no by modifying the redis.conf configuration file (same effect as 1)

By modifying the redis.conf file modify.


Finally, remember to restart redis: /etc/init.d/redis-server restart (If restarting doesn’t work, try stopping redis first [/etc/init.d/redis-server stop] and then starting it again [/etc/init.d/redis-server start].

Linux apt-get update Error: Error in `appstreamcli‘: double free or corruption … Aborted (core dumped)

Reason:
the built-in libappstream of Ubuntu 16.0.4 is a version before 2.0. We must update it to a version above 3.0

Solution:

Clear libappstream3 (purge cleans more configuration files than remove)

sudo apt-get purge libappstream3

Operation results:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gnome-software-common libgtkspell3-3-0
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  appstream* gnome-software* libappstream3* ubuntu-software*
0 upgraded, 0 newly installed, 4 to remove and 281 not upgraded.
After this operation, 1,759 kB disk space will be freed.
Do you want to continue?[Y/n] y
(Reading database ... 214637 files and directories currently installed.)
Removing ubuntu-software (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Removing gnome-software (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Purging configuration files for gnome-software (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Removing appstream (0.9.4-1) ...
Purging configuration files for appstream (0.9.4-1) ...
rmdir: failed to remove '/var/cache/app-info/': Directory not empty
Removing libappstream3:amd64 (0.9.4-1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu4.8) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160415-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11.3) ...
[email protected]:~$ 

Continue:

sudo apt autoremove

result:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  gnome-software-common libgtkspell3-3-0
0 upgraded, 0 newly installed, 2 to remove and 280 not upgraded.
After this operation, 2,744 kB disk space will be freed.
Do you want to continue?[Y/n] y
(Reading database ... 214577 files and directories currently installed.)
Removing gnome-software-common (3.20.1+git20160420.1.ca63436.ubuntu-xenial-0ubuntu2) ...
Removing libgtkspell3-3-0:amd64 (3.0.7-2) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu11.3) ...

Execution:

sudo apt-get update

result:

[email protected]:~$ sudo apt-get update
Hit:1 http://archive.canonical.com/ubuntu xenial InRelease
Hit:2 http://mirrors.aliyun.com/ubuntu xenial InRelease
Hit:3 http://mirrors.aliyun.com/ubuntu xenial-updates InRelease                  
Hit:4 http://mirrors.aliyun.com/ubuntu xenial-backports InRelease                
Hit:5 http://mirrors.aliyun.com/ubuntu xenial-security InRelease                 
Reading package lists... Done                     
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:4
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:2 and /etc/apt/sources.list:4
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:3 and /etc/apt/sources.list:24
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:5 and /etc/apt/sources.list:29
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (multiverse/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Translations (multiverse/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:11 and /etc/apt/sources.list:53
W: Target Packages (restricted/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Packages (restricted/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
W: Target Translations (restricted/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:15 and /etc/apt/sources.list:63
[email protected]:~$ 

No more mistakes

Solution to error reporting in opencv4.0 compilation of logo-logo

Problem Description:

Recently, when learning integrated navigation, Ubuntu 20 + opencv4.0 was used. When compiling logo-beam, the following error messages were encountered:

10: fatal error: opencv/CV. H: no such file or directory
13 |#include & lt; opencv/cv.h>

Solution:

This is caused by the version change of OpenCV library. Put #include & lt; opencv/cv.h> Replace with #include & lt; opencv2/opencv.hpp> Just.

VirtualBox reports an error supr3hardenedwinrespawn what 5 when opening the virtual machine

Phenomenon:

After installing virtuabox for the first time, you can open the software normally and successfully install the Ubuntu virtual machine. However, once you restart the computer (win10 enterprise 1607), open the VirtualBox software again and click start the virtual machine, an error will appear: “VirtualBox sur3hardenedwinrespawn what 5 Verr_ invalid_ name (-104)”

resolvent:

Open registry as administrator: regedit

Find HKEY_ LOCAL_ MACHINE\SYSTEM\CurrentControlSet\services\VBoxDrv

Change the start attribute value from 1 to 3

Create a script file, start_ VBoxDrv .bat

 

Script content:

@echo off

sc start vboxdrv

pause

Run start as Administrator_ Vboxdrv. Bat, and then restart the computer. After starting, run start again as an administrator_ Vboxdrv. Bat, and then you can use the VirtualBox virtual machine normally

Conclusion:

be careful:

Run start every time you restart the system_ Vboxdrv.bat, and then open the virtual machine to solve this problem

reference material:

https://forums.virtualbox.org/viewtopic.php?f=6&amp ; t=82277

Ubuntu Reportno moulde named tkinter

In the Ubuntu system, an error is reported by using Python Tkinter:
no mount named Tkinter
the following error appears after changing the code file to Tkinter

using sudo apt to install Python TK
in fact, a solution has been prompted in the error report, so you should read the tips carefully