Category Archives: Linux

[Solved] Cannot run program “svn” (in directory “D: xxxx”): CreateProcess error=2, the system cannot find the specified file.

 

1. Error content

Cannot run program “svn” (in directory “xxxx”): CreateProcess error=2, the system cannot find the specified file

2. Reason

The command was not installed when TortoiseSVN was installed, so version management cannot be performed through the command

3. Solution

1. Find the TortoiseSVN installation package you downloaded at that time and reinstall it

2. Select the first one here

3. The second option is X, which means that you have not installed the command. Click on and check the first one, and then confirm the next step

[Solved] Redis New Version Install Error: server.c:3014:36: error: ‘struct redisServer’ has no member named ‘aof_filename’

The installation of a new version of Redis reports an error, as follows:

Current gcc version:

Upgrade gcc version:

yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash

Install again using make

[Solved] mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No s

After mongodb is installed, mongod reports the following error:

mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Solution:

# Switch to the lib directory
cd ~/.conda/envs/my_gdal/lib # my_gdal:virtual environment
# Check if the file exists
ls -lh | grep "libcrypto.so.1.1"
-rwxrwxrwx 1 root root 3.2M Jun 4 15:43 libcrypto.so.1.1
# If the file exists execute
sudo ldconfig ~/.conda/envs/my_gdal/lib
# If the file does not exist
sudo find/-name 'libcrypto.so.1.1'
# Execute: sudo ldconfig path found
sudo ldconfig ~/.conda/pkgs/openssl-1.1.1q-h7f8727e_0/lib/

[Solved] FATAL ERROR:Network error: Software caused connection abort

SSH client to connect, stuck or pscp command report an error as follows in pscp.exe  XXXXXX    XXXXXXX  windows:

FATAL  ERROR:Network  error:Software  caused  connection  abort

 

How to Solve:

1. Please check the firewall policy of Linux host;

2. Add a line sshd: all at the end (or add by IP address and address segment) in /etc/hosts.allow file, and save it;

3. systemctl restart   sshd. service; Restart the ssh service;

[Solved] E Sub-process usrbindpkg returned an error code (1)

1. The problems are as follows:

An error was reported when installing the software

dlz@ubuntu:~$ sudo apt install wireshark-qt

2. Solution

The code is as follows (example):

root@ubuntu:~# sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old
root@ubuntu:~# sudo mkdir /var/lib/dpkg/info
root@ubuntu:~# sudo apt-get update
Hit:1 http://mirrors.ustc.edu.cn/ubuntu focal InRelease
Hit:2 http://mirrors.ustc.edu.cn/ubuntu focal-updates InRelease                
Hit:3 http://mirrors.ustc.edu.cn/ubuntu focal-backports InRelease              
Hit:4 http://mirrors.ustc.edu.cn/ubuntu focal-security InRelease               
Hit:5 http://ppa.launchpad.net/linrunner/tlp/ubuntu focal InRelease            
Reading package lists... Done
root@ubuntu:~# sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 518 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up wireshark-common (3.2.3-1) ...
Setting up wireshark-qt (3.2.3-1) ...
Setting up wireshark (3.2.3-1) ...
root@ubuntu:~# sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old
root@ubuntu:~# sudo rm -rf /var/lib/dpkg/info
root@ubuntu:~# sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info
root@ubuntu:~# 

ubuntu install package Error: subprocess installed post-installation script returned error exit status 10

foreword

When using the Ubuntu environment to sudo apt-get installinstall package, an error will be reported

XXX is the installation package

copy code
dpkg:error processing package XXX (--configure):
subprocess installed post-installation script returned error exit status 10

The reason for the error is actually a permission problem

Solution:

copy code
# If this error has already occurred, you need to delete these leftover packages that you just downloaded and download them again
sudo rm /var/lib/dpkg/info/XXX*

sudo dpkg --configure -D 777 XXX

# Repairing installer dependencies
sudo apt-get  -f install

[Solved] Any Softwares Install Error in Ubuntu: /usr/bin/dpkg returned an error code

After reinstalling mysql, I get an error when installing any software

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wget is already the newest version (1.21.2-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-8.0 (8.0.30-0ubuntu0.22.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
Specified filename /var/lib/mysql/ibdata1 does not exist.
mysqld will log errors to /var/log/mysql/error.log
2022-09-02T07:28:00.496933Z 0 [ERROR] [MY-010946] [Server] Failed to start mysqld daemon. Check mysqld error log.
Warning: Unable to start the server.
AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in profile /etc/apparmor.d/usr.sbin.mysqld at line 9: Could not open 'abstractions/mysql'
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xeu mysql.service" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Fri 2022-09-02 15:28:00 CST; 3ms ago
    Process: 15388 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
        CPU: 6ms
dpkg: error processing package mysql-server-8.0 (--configure):
 installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-8.0; however:
  Package mysql-server-8.0 is not configured yet.

dpkg: error processing package mysql-server (--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:
 mysql-server-8.0
 mysql-server



E: Sub-process /usr/bin/dpkg returned an error code (1)

Solution:

ls -l /var/lib/dpkg/info | grep -i  mysql-server
-rw-r--r-- 1 root root     363 Jul 27 00:14 mysql-server-8.0.conffiles
-rwxr-xr-x 1 root root    1504 Jul 27 00:14 mysql-server-8.0.config
-rw-r--r-- 1 root root    1604 Aug 31 19:00 mysql-server-8.0.list
-rw-r--r-- 1 root root    1112 Jul 27 00:14 mysql-server-8.0.md5sums
-rwxr-xr-x 1 root root   17135 Jul 27 00:14 mysql-server-8.0.postinst
-rwxr-xr-x 1 root root    3873 Jul 27 00:14 mysql-server-8.0.postrm
-rwxr-xr-x 1 root root    5631 Jul 27 00:14 mysql-server-8.0.preinst
-rwxr-xr-x 1 root root     403 Jul 27 00:14 mysql-server-8.0.prerm
-rw-r--r-- 1 root root   21907 Jul 27 00:14 mysql-server-8.0.templates
-rw-r--r-- 1 root root    5232 Aug 31 19:00 mysql-server-core-8.0.list
-rw-r--r-- 1 root root    8318 Jul 27 00:14 mysql-server-core-8.0.md5sums
 mv /var/lib/dpkg/info/mysql-* /tmp
apt-get update

How to Solve labelme Install Error in Ubuntu

Create a labelme environment using a virtual environment:

According to the official guidelines, link: GitHub – wkentaro/label: image polygon annotation with python (polygon, rectangle, circle, line, point and image level flag annotation)

conda create --name=labelme python=3
source activate labelme
pip install labelme

Question 1:

gcc -pthread -B /home/XXX/fxp/envs/labelme/compiler_compat -Wno-unused-
result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem 
/home/XXX/fxp/envs/labelme/include -fPIC -O2 -isystem 
/home/XXX/fxp/envs/labelme/include -fPIC -DFREETYPE_BUILD_TYPE=system -
DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -
DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -
Iextern/agg24-svn/include -I/home/XXX/fxp/envs/labelme/lib/python3.10/site-
packages/numpy/core/include -I/home/XXX/fxp/envs/labelme/include/python3.10
 -c src/checkdep_freetype2.c -o build/temp.linux-x86_64-cpython-
310/src/checkdep_freetype2.o
      src/checkdep_freetype2.c:3:6: error: #error "FreeType version 2.3 or higher 
is required. You may set the MPLLOCALFREETYPE environment variable to 1 to let 
Matplotlib download it."
           #error "FreeType version 2.3 or higher is required. \

            ^~~~~
      src/checkdep_freetype2.c:10:10: error: #include expects "FILENAME" or 
<FILENAME>
       #include FT_FREETYPE_H
                ^~~~~~~~~~~~~
      src/checkdep_freetype2.c:15:9: note: #pragma message: Compiling with FreeType version FREETYPE_MAJOR.FREETYPE_MINOR.FREETYPE_PATCH.
       #pragma message("Compiling with FreeType version " \
               ^~~~~~~
      src/checkdep_freetype2.c:18:4: error: #error "FreeType version 2.3 or higher
 is required. You may set the MPLLOCALFREETYPE environment variable to 1 to let Matplotlib download it."
         #error "FreeType version 2.3 or higher is required. \
          ^~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with 
pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> matplotlib

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Relevant dependent libraries need to be installed:

sudo apt-get update
sudo apt-get install libfreetype6-dev
sudo apt-get install pkg-config
sudo apt-get install libpng12-dev
sudo apt-get install pkg-config

Error 2 encountered:

labelme
[INFO   ] __init__:get_config:70 - Loading config file from: /home/XXX/.labelmerc
Traceback (most recent call last):
  File "/home/XXX/fxp/envs/labelme/lib/python3.10/site-packages/labelme/widgets/canvas.py", line 618, in paintEvent
    p.translate(self.offsetToCenter())
  File "/home/XXX/fxp/envs/labelme/lib/python3.10/site-packages/labelme/widgets/canvas.py", line 659, in offsetToCenter
    return QtCore.QPoint(x, y)
TypeError: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'
Aborted (core dumped)

Reference link: https://github.com/wkentaro/labelme/issues/1006

I guess the python version is too high, so I recreated the virtual environment with pyhton = 3.9

conda create --prefix=/home/fxp/envs/labelme python=3.9 -y

The final installation is successful;

[Solved] rk3588_buildroot Compile Error: ERROR: Running build_kernel failed!

 

Error Messages:

#
# No change to .config
#
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
fatal: not a git repository (or any of the parent directories): .git
  LZ4C    arch/arm64/boot/Image.lz4
Incorrect parameters
Usage :
      lz4 [arg] [input] [output]

input   : a filename
          with no FILE, or when FILE is - or stdin, read standard input
Arguments :
 -1     : Fast compression (default) 
 -9     : High compression 
 -d     : decompression (default for .lz4 extension)
 -z     : force compression
 -f     : overwrite output without prompting 
 -h/-H  : display help/long help and exit
arch/arm64/boot/Makefile:31: recipe for target 'arch/arm64/boot/Image.lz4' failed
make[2]: *** [arch/arm64/boot/Image.lz4] Error 1
make[2]: *** Deleting file 'arch/arm64/boot/Image.lz4'
arch/arm64/Makefile:170: recipe for target 'Image.lz4' failed
make[1]: *** [Image.lz4] Error 2
make[1]: *** Waiting for unfinished jobs....
arch/arm64/Makefile:214: recipe for target 'rk3588-evb2-lp4-v10-edp-linux.img' failed
make: *** [rk3588-evb2-lp4-v10-edp-linux.img] Error 2
ERROR: Running build_kernel failed!
ERROR: exit code 2 from line 656:
    make ARCH=$RK_ARCH $RK_KERNEL_DTS.img -j$RK_JOBS

1.error
fatal: not a git repository (or any of the parent directories): .git
2.solution
sudo git init

2.About the lz4 error, I think the version can not keep up with it, I was solved by the following methods.
sudo apt-get remove  liblz4-tool
sudo git clone https://github.com/lz4/lz4.git
cd /lz4
sudo make
sudo make install