Tag Archives: ubuntu

Ubuntu18.04 x11vnc failed, report error opening logfile: /var/log/x11vnc.log

Ubuntu 18.04 x11vnc startup failed with error. Opening logfile:/var/log/x11vnc.log

Premise summary error reporting solution

Premise summary

X11vnc was previously installed in Ubuntu 18.04, but it was not connected through VNC view recently. After logging in with SSH, an error was found according to journalctl -u x11vnc

after creating /var/log/x11vnc. Log , view x11vnc.log

report errors

root@VM-16-8-ubuntu:/home/ubuntu# cat /var/log/x11vnc.log | head -n 1000
14/10/2021 10:30:02 passing arg to libvncserver: -rfbauth
14/10/2021 10:30:02 passing arg to libvncserver: /etc/x11vnc.pass
14/10/2021 10:30:02 passing arg to libvncserver: -rfbport
14/10/2021 10:30:02 passing arg to libvncserver: 5900
14/10/2021 10:30:02 x11vnc version: 0.9.13 lastmod: 2011-08-10  pid: 96503
xauth:  unable to generate an authority file name
14/10/2021 10:30:02 -auth guess: using 'XAUTHORITY=/var/run/lightdm/root/:0' for disp='unset'
14/10/2021 10:30:02 XOpenDisplay("") failed.
14/10/2021 10:30:02 Trying again with XAUTHLOCALHOSTNAME=localhost ...
14/10/2021 10:30:02 
14/10/2021 10:30:02 *** XOpenDisplay failed. No -display or DISPLAY.
14/10/2021 10:30:02 *** Trying ":0" in 4 seconds.  Press Ctrl-C to abort.
14/10/2021 10:30:02 *** 1 2 3 4 
14/10/2021 10:30:06 *** XOpenDisplay of ":0" successful.
14/10/2021 10:30:06 
14/10/2021 10:30:06 Using X display :0
14/10/2021 10:30:06 rootwin: 0x2a0 reswin: 0xe00001 dpy: 0xc6786c40
14/10/2021 10:30:06 
14/10/2021 10:30:06 ------------------ USEFUL INFORMATION ------------------
14/10/2021 10:30:06 
14/10/2021 10:30:06 Wireframing: -wireframe mode is in effect for window moves.
14/10/2021 10:30:06   If this yields undesired behavior (poor response, painting
14/10/2021 10:30:06   errors, etc) it may be disabled:
14/10/2021 10:30:06    - use '-nowf' to disable wireframing completely.
14/10/2021 10:30:06    - use '-nowcr' to disable the Copy Rectangle after the
14/10/2021 10:30:06      moved window is released in the new position.
14/10/2021 10:30:06   Also see the -help entry for tuning parameters.
14/10/2021 10:30:06   You can press 3 Alt_L's (Left "Alt" key) in a row to 
14/10/2021 10:30:06   repaint the screen, also see the -fixscreen option for
14/10/2021 10:30:06   periodic repaints.
14/10/2021 10:30:06 
14/10/2021 10:30:06 XFIXES available on display, resetting cursor mode
14/10/2021 10:30:06   to: '-cursor most'.
14/10/2021 10:30:06   to disable this behavior use: '-cursor arrow'
14/10/2021 10:30:06   or '-noxfixes'.
14/10/2021 10:30:06 using XFIXES for cursor drawing.
14/10/2021 10:30:06 GrabServer control via XTEST.
14/10/2021 10:30:06 
14/10/2021 10:30:06 Scroll Detection: -scrollcopyrect mode is in effect to
14/10/2021 10:30:06   use RECORD extension to try to detect scrolling windows
14/10/2021 10:30:06   (induced by either user keystroke or mouse input).
14/10/2021 10:30:06   If this yields undesired behavior (poor response, painting
14/10/2021 10:30:06   errors, etc) it may be disabled via: '-noscr'
14/10/2021 10:30:06   Also see the -help entry for tuning parameters.
14/10/2021 10:30:06   You can press 3 Alt_L's (Left "Alt" key) in a row to 
14/10/2021 10:30:06   repaint the screen, also see the -fixscreen option for
14/10/2021 10:30:06   periodic repaints.
14/10/2021 10:30:06 
14/10/2021 10:30:06 XKEYBOARD: number of keysyms per keycode 7 is greater
14/10/2021 10:30:06   than 4 and 51 keysyms are mapped above 4.
14/10/2021 10:30:06   Automatically switching to -xkb mode.
14/10/2021 10:30:06   If this makes the key mapping worse you can
14/10/2021 10:30:06   disable it with the "-noxkb" option.
14/10/2021 10:30:06   Also, remember "-remap DEAD" for accenting characters.
14/10/2021 10:30:06 
14/10/2021 10:30:06 X FBPM extension not supported.
14/10/2021 10:30:06 X display is capable of DPMS.
14/10/2021 10:30:06 --------------------------------------------------------
14/10/2021 10:30:06 
14/10/2021 10:30:06 Default visual ID: 0x21
14/10/2021 10:30:06 Read initial data from X display into framebuffer.
14/10/2021 10:30:06 initialize_screen: fb_depth/fb_bpp/fb_Bpl 24/32/4096
14/10/2021 10:30:06 
14/10/2021 10:30:06 X display :0 is 32bpp depth=24 true color
14/10/2021 10:30:06 
14/10/2021 10:30:06 Listening for VNC connections on TCP port 5900
14/10/2021 10:30:06 Listening for VNC connections on TCP6 port 5900
14/10/2021 10:30:06 listen6: bind: Address already in use
14/10/2021 10:30:06 Not listening on IPv6 interface.
14/10/2021 10:30:06 
14/10/2021 10:30:06 Xinerama is present and active (e.g. multi-head).
14/10/2021 10:30:06 Xinerama: number of sub-screens: 1
14/10/2021 10:30:06 Xinerama: no blackouts needed (only one sub-screen)
14/10/2021 10:30:06 
14/10/2021 10:30:06 fb read rate: 927 MB/sec
14/10/2021 10:30:06 fast read: reset -wait  ms to: 10
14/10/2021 10:30:06 fast read: reset -defer ms to: 10
14/10/2021 10:30:06 The X server says there are 10 mouse buttons.
14/10/2021 10:30:06 screen setup finished.
14/10/2021 10:30:06 

The VNC desktop is:      VM-16-8-ubuntu:0

******************************************************************************
Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

The scheme stores pixel data offscreen on the VNC viewer side for faster
retrieval.  It should work with any VNC viewer.  Try it by running:

    x11vnc -ncache 10 ...

One can also add -ncache_cr for smooth 'copyrect' window motion.
More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching

Solution

    after executing x11vnc - ncache 10 according to the error message prompted, 5900 can be monitored normally. At this time, you can connect normally through VNC viewer, but you cannot access it through the original password. View the path to read the password in /lib/SYSTEMd/system/x11vnc. Service . Reset password sudo x11vnc - storepasswd/etc/x11vnc. Pass after restarting x11vnc systemctl restart x11vnc , you can log in with the new password successfully
    `

Dpkg: error processing package XXX solution

1. Error content:

root@xxx:/home/my_project/application-necessities# sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4ubuntu1).
libnghttp2-dev is already the newest version (1.30.0-1ubuntu1).
nghttp2 is already the newest version (1.30.0-1ubuntu1).
libssl-dev is already the newest version (1.1.1-1ubuntu2.1~18.04.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up nghttp2-proxy (1.30.0-1ubuntu1) ...
Job for nghttpx.service failed because the control process exited with error code.
See "systemctl status nghttpx.service" and "journalctl -xe" for details.
invoke-rc.d: initscript nghttpx, action "start" failed.
● nghttpx.service - HTTP/2 proxy
   Loaded: loaded (/lib/systemd/system/nghttpx.service; disabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Mon 2021-08-30 23:23:55 CST; 30ms ago
     Docs: man:nghttpx
  Process: 124287 ExecStart=/usr/sbin/nghttpx --conf=/etc/nghttpx/nghttpx.conf (code=exited, status=255)
 Main PID: 124287 (code=exited, status=255)
dpkg: error processing package nghttp2-proxy (--configure):
 installed nghttp2-proxy package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of nghttp2:
 nghttp2 depends on nghttp2-proxy (>= 1.30.0-1ubuntu1); however:
  Package nghttp2-proxy is not configured yet.

dpkg: error processing package nghttp2 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 nghttp2-proxy
 nghttp2
E: Sub-process /usr/bin/dpkg returned an error code (1)

2. Violence problem solving:

sudo mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
sudo mkdir /var/lib/dpkg/info/
sudo apt-get update

3 install it again

apt-get install xxxx

4 Preferences

https://blog.csdn.net/dou3516/article/details/105120221

NVIDIA-SMI has failed because it couldn’t communicate with the NVIDIA driver

Problem: Ubuntu 18.04 installs the graphics card driver normally. When the Ubuntu system is opened, the graphics card driver cannot be used. Use NVIDIA SMI to check the above errors.

resolvent:

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

Then restart the computer, success.

QInotifyFileSystemWatcherEngine::addPaths: inotify_add_Watch failed: there is no space on the device

When Ubuntu runs many programs and monitors too many files, it may prompt: qinotifyfilesystemwatcherengine:: addpaths: inotify when running other programs_ add_ Watch failed: there is no space on the device

This involves the concept of Linux file system event monitoring framework

terms of settlement:

Add maximum number of monitoring files

Command settings: sudo sysctl fs.inotify.max_ user_ watches=524288

Effective: sudo sysctl – P

This method can only be solved temporarily. It will recover after restart. Enter the above two lines of commands every time you encounter this problem

“The CC version check failed” is reported when Ubuntu installs NVIDIA graphics card driver

I have referred to the questions answered by many bloggers, but there are many problems or troubles. I recommend a better solution after I try to solve it:

The reason for this problem is that the driver may be relatively new, and the GCC version of the system kernel is inconsistent with the default GCC version of the compiler. First, GCC -v check the default GCC version of the current compiler. If it is relatively low and you have not updated the GCC version, upgrade the GCC and C + + versions: sudo apt get install gcc-9 G + ± 9 – Y

Then open the installation path to see the GCC versions: LS/usr/bin/GCC*

Generally, the GCC version has been upgraded. If there are multiple versions in this directory, set the soft connection between GCC and G + +:
CD/usr/bin

sudo ln -sf gcc-9 gcc
sudo ln -sf g+±9 g++

Finally, just update the environment:
source/etc/environment

At this time, GCC -v check the GCC version of the current compiler. If it is consistent with the version prompted by the kernel, you can install it according to the normal graphics card driver steps

53 Command “python setup.py egg_info“ failed with error

53.1 introduction

Today, we set up the esp8266 development environment of Anxin technology in the Ubuntu environment. When we went to the configuration step, a problem occurred. We checked it online, but it was not actually solved. Later, we found that the foreign blog encountered the same problem as me. We solved it by referring to his practice. This is hereby recorded to make up for the lack of integrity of the Chinese blog’s solution to this problem.

53.2 problems

The configuration compilation problem is as follows:

qihua@qihua-virtual-machine:~/esp/setuptools-19.2$ sudo pip install setuptools -U
The directory '/home/qihua/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/qihua/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/1e/5c/3d7b3d91a86d71faf5038c5d259ed36b5d05b7804648e2c43251d574a6e6/setuptools-58.2.0.tar.gz (2.3MB)
    100% |████████████████████████████████| 2.3MB 830kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "setuptools/__init__.py", line 16, in <module>
        import setuptools.version
      File "setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "pkg_resources/__init__.py", line 1367
        raise SyntaxError(e) from e
                                ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-H1VVcQ/setuptools/
You are using pip version 8.1.1, however version 21.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

According to the above prompt, it is caused by the low version of PIP tool. As long as you run PIP related commands, an error will occur.

sudo python -m pip install --user -r $IDF_PATH/requirements.txt
The directory '/home/qihua/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/qihua/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied (use --upgrade to upgrade): setuptools in /home/qihua/esp/setuptools-19.2 (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 4))
Collecting click>=5.0 (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 8))
  Downloading https://files.pythonhosted.org/packages/21/83/308a74ca1104fe1e3197d31693a7a2db67c2d4e668f20f43a2fca491f9f7/click-8.0.1.tar.gz (327kB)
    100% |████████████████████████████████| 327kB 538kB/s 
    Complete output from command python setup.py egg_info:
    error in click setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected version spec in colorama; platform_system == 'Windows' at ; platform_system == 'Windows'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-iqFjPF/click/
You are using pip version 8.1.1, however version 21.2.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

However, follow the prompts to execute the upgrade instruction: PIP install — upgrade pip   After, it’s useless. It’s not updated to.

53.3 solution

After a review, the command to automatically upgrade PIP (as follows) failed. It may just match the version used in the current environment.

pip install --upgrade pip

Then, upgrade pip to a higher version by specifying the upgrade version. The command is as follows:

pip install --upgrade pip==20.3

After upgrading pip, I also upgraded the setuptools tool.

qihua@qihua-virtual-machine:~/esp/setuptools-19.2$ python -m pip install --upgrade setuptools
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting setuptools
  Downloading setuptools-44.1.1-py2.py3-none-any.whl (583 kB)
     |████████████████████████████████| 583 kB 231 kB/s 
Installing collected packages: setuptools
Successfully installed setuptools-44.1.1
WARNING: You are using pip version 20.3; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

Finally, the problem is solved!!

qihua@qihua-virtual-machine:~/esp/setuptools-19.2$ sudo python -m pip install --user -r $IDF_PATH/requirements.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
WARNING: The directory '/home/qihua/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: setuptools in /usr/local/lib/python2.7/dist-packages/setuptools-19.2-py2.7.egg (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 4)) (19.2)
Collecting click>=5.0
  Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
     |████████████████████████████████| 82 kB 207 kB/s 
Requirement already satisfied: pyserial>=3.0 in /usr/lib/python2.7/dist-packages (from -r /home/qihua/esp/ESP8266_RTOS_SDK/requirements.txt (line 9)) (3.0.1)
Collecting future>=0.15.2
  Downloading future-0.18.2.tar.gz (829 kB)
     |████████████████████████████████| 829 kB 363 kB/s 
Collecting cryptography>=2.1.4
  Downloading cryptography-3.3.2-cp27-cp27mu-manylinux2010_x86_64.whl (2.6 MB)
     |████████████████████████████████| 2.6 MB 8.0 MB/s 
Collecting pyparsing<2.4.0,>=2.0.3
  Downloading pyparsing-2.3.1-py2.py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 19.0 MB/s 
Collecting pyelftools>=0.22
  Downloading pyelftools-0.27-py2.py3-none-any.whl (151 kB)
     |████████████████████████████████| 151 kB 34.7 MB/s 
Collecting enum34; python_version < "3"
  Downloading enum34-1.1.10-py2-none-any.whl (11 kB)
Collecting six>=1.4.1
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting ipaddress; python_version < "3"
  Downloading ipaddress-1.0.23-py2.py3-none-any.whl (18 kB)
Collecting cffi>=1.12
  Downloading cffi-1.14.6-cp27-cp27mu-manylinux1_x86_64.whl (389 kB)
     |████████████████████████████████| 389 kB 12.1 MB/s 
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 18.2 MB/s 
Building wheels for collected packages: future
  Building wheel for future (setup.py) ... done
  Created wheel for future: filename=future-0.18.2-py2-none-any.whl size=504728 sha256=b1326b708e930fd621e0c6b869c09994de1f05597255e33694647dcdb71475df
  Stored in directory: /tmp/pip-ephem-wheel-cache-lty8At/wheels/5f/11/0c/aad680baf5ef4fbcbab992c9f03e1130357e0c173a4fdabfff
Successfully built future
Installing collected packages: click, future, enum34, six, ipaddress, pycparser, cffi, cryptography, pyparsing, pyelftools
  WARNING: The scripts futurize and pasteurize are installed in '/home/qihua/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed cffi-1.14.6 click-7.1.2 cryptography-3.3.2 enum34-1.1.10 future-0.18.2 ipaddress-1.0.23 pycparser-2.20 pyelftools-0.27 pyparsing-2.3.1 six-1.16.0
WARNING: You are using pip version 20.3; however, version 20.3.4 is available.
You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

[Solved] Ubuntu Update source error: Certificate verification failed: The certificate is NOT trusted.

Updating the Ubuntu source today always reports an error

Ign:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal InRelease
Ign:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates InRelease
Ign:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports InRelease
Ign:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security InRelease
Err:5 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Err:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Err:7 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Err:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release
  Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 101.6.15.130 443]
Reading package lists... Done
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://mirrors.tuna.tsinghua.edu.cn/ubuntu focal-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Finally, refer to the method of online leaders, change HTTPS in the software source to HTTP, and solve it successfully.

# The source image is commented by default to improve the speed of apt update, you can uncomment it if needed
deb http://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 http://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 http://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 http://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

Ubuntu20.04 Installing WslRegisterDistribution failed with error: 0xc03a001a

After installing Ubuntu in the software store, the following prompt appears after opening, indicating that you have compressed the file to save space (if two opposite blue arrows appear in the upper right corner of your file, you have enabled this function).

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0xc03a001a
Error: 0xc03a001a ???????????????????????????????????????????????????

Solution:

1. Go to the C: \ users \ user name \ appdata \ local \ packages folder. If you can’t find some files that may be hidden files, you need to click View in the file manager and select the option of hidden items.

  2. Enter the directory and enter “Ubuntu” to search the subdirectory.

3. After finding the subdirectory, right-click properties & gt& gt; Advanced & gt& gt; Uncheck compressed content to save disk space & gt& gt; determine

4. The blue arrow on the file disappears and it’s OK.

Ubuntu 18.04 installation of opencv2.4.13 encountered fatal error. Possible solutions

Ubuntu 18.04 installation of opencv2.4.13 encountered fatal error. Possible solutions

During the installation process, some fatal errors may occur. I haven’t found a method for a long time. I happened to see an article that the installation can be successful according to the following methods. Although the errors reported are not consistent, they can be used in this way.

Ubuntu installation opencv step pit

1、 Installation process

apt-get update
apt-get install build-essential
apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
     
     
cd opencv-2.4.13
mkdir release
cd release/

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j4
sudo make install

[UNK]ह_;;

CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:85 (list):

CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:85 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:77 (include)


CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:86 (list):
  list GET given empty list
Call Stack (most recent call first):
  CMakeLists.txt:77 (include)




CMake Error at cmake/OpenCVDetectCXXCompiler.cmake:89 (math):
  math cannot parse the expression: "*100 + ": syntax error, unexpected
  exp_TIMES, expecting exp_PLUS or exp_MINUS or exp_OPENPARENT or exp_NUMBER
  (1)
Call Stack (most recent call first):
  CMakeLists.txt:77 (include)

Solution
replace the contents of opencvdetectcxxcompiler.cmake with the following:

# ----------------------------------------------------------------------------
# Detect Microsoft compiler:
# ----------------------------------------------------------------------------
if(CMAKE_CL_64)
    set(MSVC64 1)
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
  set(CMAKE_COMPILER_IS_GNUCXX 1)
  set(CMAKE_COMPILER_IS_CLANGCXX 1)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
  set(CMAKE_COMPILER_IS_GNUCC 1)
  set(CMAKE_COMPILER_IS_CLANGCC 1)
endif()
if("${CMAKE_CXX_COMPILER};${CMAKE_C_COMPILER}" MATCHES "ccache")
  set(CMAKE_COMPILER_IS_CCACHE 1)
endif()

# ----------------------------------------------------------------------------
# Detect Intel ICC compiler -- for -fPIC in 3rdparty ( UNIX ONLY ):
#  see  include/opencv/cxtypes.h file for related   ICC & CV_ICC defines.
# NOTE: The system needs to determine if the '-fPIC' option needs to be added
#  for the 3rdparty static libs being compiled.  The CMakeLists.txt files
#  in 3rdparty use the CV_ICC definition being set here to determine if
#  the -fPIC flag should be used.
# ----------------------------------------------------------------------------
if(UNIX)
  if  (__ICL)
    set(CV_ICC   __ICL)
  elseif(__ICC)
    set(CV_ICC   __ICC)
  elseif(__ECL)
    set(CV_ICC   __ECL)
  elseif(__ECC)
    set(CV_ICC   __ECC)
  elseif(__INTEL_COMPILER)
    set(CV_ICC   __INTEL_COMPILER)
  elseif(CMAKE_C_COMPILER MATCHES "icc")
    set(CV_ICC   icc_matches_c_compiler)
  endif()
endif()

if(MSVC AND CMAKE_C_COMPILER MATCHES "icc|icl")
  set(CV_ICC   __INTEL_COMPILER_FOR_WINDOWS)
endif()

# ----------------------------------------------------------------------------
# Detect GNU version:
# ----------------------------------------------------------------------------
if(CMAKE_COMPILER_IS_CLANGCXX)
  set(CMAKE_GCC_REGEX_VERSION "4.2.1")
  set(CMAKE_OPENCV_GCC_VERSION_MAJOR 4)
  set(CMAKE_OPENCV_GCC_VERSION_MINOR 2)
  set(CMAKE_OPENCV_GCC_VERSION 42)
  set(CMAKE_OPENCV_GCC_VERSION_NUM 402)

  execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -v
                  ERROR_VARIABLE CMAKE_OPENCV_CLANG_VERSION_FULL
                  ERROR_STRIP_TRAILING_WHITESPACE)

  string(REGEX MATCH "version.*$" CMAKE_OPENCV_CLANG_VERSION_FULL "${CMAKE_OPENCV_CLANG_VERSION_FULL}")
  string(REGEX MATCH "[0-9]+\\.[0-9]+" CMAKE_CLANG_REGEX_VERSION "${CMAKE_OPENCV_CLANG_VERSION_FULL}")

elseif(CMAKE_COMPILER_IS_GNUCXX)
  execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
                OUTPUT_VARIABLE CMAKE_OPENCV_GCC_VERSION_FULL
                OUTPUT_STRIP_TRAILING_WHITESPACE)

  execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -v
                ERROR_VARIABLE CMAKE_OPENCV_GCC_INFO_FULL
                OUTPUT_STRIP_TRAILING_WHITESPACE)

  # Typical output in CMAKE_OPENCV_GCC_VERSION_FULL: "c+//0 (whatever) 4.2.3 (...)"
  # Look for the version number, major.minor.build
  string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
  if(NOT CMAKE_GCC_REGEX_VERSION)#major.minor
    string(REGEX MATCH "[0-9]+\\.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
  endif()

  if(CMAKE_GCC_REGEX_VERSION)
    # Split the parts:
    string(REGEX MATCHALL "[0-9]+" CMAKE_OPENCV_GCC_VERSIONS "${CMAKE_GCC_REGEX_VERSION}")

    list(GET CMAKE_OPENCV_GCC_VERSIONS 0 CMAKE_OPENCV_GCC_VERSION_MAJOR)
    list(GET CMAKE_OPENCV_GCC_VERSIONS 1 CMAKE_OPENCV_GCC_VERSION_MINOR)
  else()#compiler returned just the major version number
    string(REGEX MATCH "[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
    if(NOT CMAKE_GCC_REGEX_VERSION)#compiler did not return anything reasonable
      set(CMAKE_GCC_REGEX_VERSION "0")
      message(WARNING "GCC version not detected!")
    endif()
    set(CMAKE_OPENCV_GCC_VERSION_MAJOR ${CMAKE_GCC_REGEX_VERSION})
    set(CMAKE_OPENCV_GCC_VERSION_MINOR 0)
  endif()

  set(CMAKE_OPENCV_GCC_VERSION ${CMAKE_OPENCV_GCC_VERSION_MAJOR}${CMAKE_OPENCV_GCC_VERSION_MINOR})
  math(EXPR CMAKE_OPENCV_GCC_VERSION_NUM "${CMAKE_OPENCV_GCC_VERSION_MAJOR}*100 + ${CMAKE_OPENCV_GCC_VERSION_MINOR}")
  message(STATUS "Detected version of GNU GCC: ${CMAKE_OPENCV_GCC_VERSION} (${CMAKE_OPENCV_GCC_VERSION_NUM})")

  if(WIN32)
    execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
              OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
              OUTPUT_STRIP_TRAILING_WHITESPACE)
    if(OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
      set(MINGW64 1)
    endif()
  endif()
endif()

if(MSVC64 OR MINGW64)
  set(X86_64 1)
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
  set(X86 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
  set(X86_64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
  set(X86 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
  set(ARM 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
  set(AARCH64 1)
endif()

# Workaround for 32-bit operating systems on 64-bit x86_64 processor
if(X86_64 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT FORCE_X86_64)
  message(STATUS "sizeof(void) = 4 on x86/x86_64 processor. Assume 32-bit compilation mode (X86=1)")
  unset(X86_64)
  set(X86 1)
endif()

# Similar code exists in OpenCVConfig.cmake
if(NOT DEFINED OpenCV_STATIC)
  # look for global setting
  if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
    set(OpenCV_STATIC OFF)
  else()
    set(OpenCV_STATIC ON)
  endif()
endif()

if(MSVC)
  if(CMAKE_CL_64)
    set(OpenCV_ARCH x64)
  elseif((CMAKE_GENERATOR MATCHES "ARM") OR ("${arch_hint}" STREQUAL "ARM") OR (CMAKE_VS_EFFECTIVE_PLATFORMS MATCHES "ARM|arm"))
    # see Modules/CmakeGenericSystem.cmake
    set(OpenCV_ARCH ARM)
  else()
    set(OpenCV_ARCH x86)
  endif()
  if(MSVC_VERSION EQUAL 1400)
    set(OpenCV_RUNTIME vc8)
  elseif(MSVC_VERSION EQUAL 1500)
    set(OpenCV_RUNTIME vc9)
  elseif(MSVC_VERSION EQUAL 1600)
    set(OpenCV_RUNTIME vc10)
  elseif(MSVC_VERSION EQUAL 1700)
    set(OpenCV_RUNTIME vc11)
  elseif(MSVC_VERSION EQUAL 1800)
    set(OpenCV_RUNTIME vc12)
  elseif(MSVC_VERSION EQUAL 1900)
    set(OpenCV_RUNTIME vc14)
  elseif(MSVC_VERSION EQUAL 1910)
    set(OpenCV_RUNTIME vc15)
  endif()
elseif(MINGW)
  set(OpenCV_RUNTIME mingw)

  if(MINGW64)
    set(OpenCV_ARCH x64)
  else()
    set(OpenCV_ARCH x86)
  endif()
endif()

/Usr/include/C + +/7/cstdlib: 75:15: fatal error: stdlib. H: there is no such file or directory
solution: change the cmake instruction

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local .. -D ENABLE_PRECOMPILED_HEADERS=OFF ..

[Solved] error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such…

Exception: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory
Solution:

# find/ -name 'libmysqlclient*'
/usr/local/mysql/lib/libmysqlclient.a
/usr/local/mysql/lib/libmysqlclient.so.20.3.10
/usr/local/mysql/lib/libmysqlclient.so
/usr/local/mysql/lib/libmysqlclient.so.20
/usr/lib64/mysql/libmysqlclient.so.18
/usr/lib64/mysql/libmysqlclient.so.18.0.0

# ln -s /usr/local/mysql/lib/libmysqlclient.so.20 /usr/local/lib/libmysqlclient.so.20
# vim /etc/ld.so.conf
/usr/local/lib				#Write
# ldconfig -v

Windows11 Install Ubuntu Error: WslRegisterDistribution failed with error: 0x800701bc

Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x800701bc
Error: 0x800701bc WSL 2 ??????????????????https://aka.ms/wsl2kernel

Press any key to continue...

Need to upgrade the WSL kernel, download and install on it
https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi