Category Archives: Linux

[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

How to Solve Git Filename too long Error

report errors

Prompt filename too long when git clone code

Solution:

Open the command window with the administrator and enter git config — system core.longpaths true to solve the problem.

git config --system core.longpaths true

[Solved] Error in installing backups.lzma for Python on Linux

Error in installing backups.lzma for Python on Linux

pip3.9 install backports.lzma

Error Message:

Running setup.py install for backports.lzma … error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.9 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘”’”’/tmp/pip-install-pnrkhuf9/backports-lzma_24feded447a34e5a8b1c53cb80e10341/setup.py’”’”’; file=’”’”’/tmp/pip-install-pnrkhuf9/backports-lzma_24feded447a34e5a8b1c53cb80e10341/setup.py’”’”’;f = getattr(tokenize, ‘”’”‘open’”’”’, open)(file) if os.path.exists(file) else io.StringIO(’”’”‘from setuptools import setup; setup()’”’”’);code = f.read().replace(’”’”’\r\n’”’”’, ‘”’”’\n’”’”’);f.close();exec(compile(code, file, ‘”’”‘exec’”’”’))’ install –record /tmp/pip-record-tcqknwy3/install-record.txt –single-version-externally-managed –compile –install-headers /usr/local/python3.9/include/python3.9/backports.lzma
cwd: /tmp/pip-install-pnrkhuf9/backports-lzma_24feded447a34e5a8b1c53cb80e10341/
Complete output (21 lines):
This is backports.lzma version 0.0.14
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/backports
copying backports/init.py -> build/lib.linux-x86_64-3.9/backports
creating build/lib.linux-x86_64-3.9/backports/lzma
copying backports/lzma/init.py -> build/lib.linux-x86_64-3.9/backports/lzma
running build_ext
building ‘backports.lzma._lzma’ extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/backports
creating build/temp.linux-x86_64-3.9/backports/lzma
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python3.9/include -I/root/include -I/opt/local/include -I/usr/local/include -I/usr/local/python3.9/include/python3.9 -c backports/lzma/_lzmamodule.c -o build/temp.linux-x86_64-3.9/backports/lzma/_lzmamodule.o
backports/lzma/_lzmamodule.c:115:10: fatal error: lzma.h: No such file or directory
#include <lzma.h>
^~~~~~~~
compilation terminated.
error: command ‘/usr/bin/gcc’ failed with exit code 1
—————————————-
ERROR: Command errored out with exit status 1: /usr/bin/python3.9 -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘”’”’/tmp/pip-install-pnrkhuf9/backports-lzma_24feded447a34e5a8b1c53cb80e10341/setup.py’”’”’; file=’”’”’/tmp/pip-install-pnrkhuf9/backports-lzma_24feded447a34e5a8b1c53cb80e10341/setup.py’”’”’;f = getattr(tokenize, ‘”’”‘open’”’”’, open)(file) if os.path.exists(file) else io.StringIO(’”’”‘from setuptools import setup; setup()’”’”’);code = f.read().replace(’”’”’\r\n’”’”’, ‘”’”’\n’”’”’);f.close();exec(compile(code, file, ‘”’”‘exec’”’”’))’ install –record /tmp/pip-record-tcqknwy3/install-record.txt –single-version-externally-managed –compile –install-headers /usr/local/python3.9/include/python3.9/backports.lzma Check the logs for full command output.

Solution:

apt install -y liblzma-dev #ubuntu
yum install -y xz-devel    #centos

At this point, there is no problem when executing pip3.9 install backups.lzma

Centos7 Error: initramfs not found

Problem description

Centos7 reports an error: file ‘/ initramfs -… Img’ not found

Problem solving

This problem occurred after I set up the mount. After some guidance from Baidu and Lao Han, it was finally solved

Solution:

yum reinstall kernel

Is to reinstall the kernel

[Solved] Rocketmq error: service not available now, may disk full, CL: 0.95, CQ: 0.95, index: 0.95

Rocketmq reports an error: service not available now, may disk full, CL: 0.95, CQ: 0.95, index: 0.95, may
the error is caused by the large log file in the/store/commitlog folder. Df-h instructs to view the memory occupied by the current disk   By default, rocketmq will treat the ratio of remaining disks less than 75% as insufficient disk space

Solution:

1. Delete the useless log files in the/store/commitlog folder first

2. Edit/conf/2m-2s-async/broker-a.properties file and add   Diskmaxusedspaceratio = 98. An error will be reported when the disk occupies 98%

3. Check whether other processes occupy a lot of space. My problem is the logstash problem of elk. Just kill the process

[Solved] Jenkins+Ant Error: Error reading project file xxxxx

My colleague used Jenkins + ant + JMeter to build the interface automation shelf. Today, my colleague asked me to help look at a problem

The error reports are as follows:
error reading project file/var/lib/Jenkins/workspace/2021. M6/build. XML

at first, I thought the file could not be found. Later, I went to the server to check it. The file is in. (after thinking about it carefully, it should be not find if the file cannot be found. This error means that there is an error reading the file. In fact, there is an error reading and writing due to insufficient permissions)
later, I can successfully execute the ant command on the server
after step-by-step analysis and troubleshooting, it is found that it is a problem of permissions. After Jenkins is installed on the server, a user named Jenkins is automatically created. By default, the permissions of this user are also used
when I switch the Linux user to Jenkins and execute the ant command, the above error is reported. The root user will not report an error
therefore, the solution is to increase the permissions of Jenkins to root
1. Add the Jenkins user to the root group

gpasswd -a root jenkins

2[UNK]vim /etc/sysconfig/jenkins

JENKINS_USER="root"
JENKINS_GROUP="root"

3. Restart Jenkins

service jenkins restart

Final effect:

[Solved] CRITICAL:yum.cli:Config error: Error accessing file for config file:///opt/++

report errors

[root@localhost opt]# ls
apr-1.6.2.tar.gz
apr-util-1.6.0.tar.gz
boost_1_59_0.tar.gz
httpd-2.4.29.tar.bz2
mysql-boost-5.7.20.tar.gz
rh
[root@localhost opt]# yum install -y \
> gcc \
> gcc -c++ \
> ncurses-devel \
> bison \
> cmake
CRITICAL:yum.cli:Config error: Error accessing file for config file:///opt/++
error:
[root@localhost opt]# yum -y install gcc gcc-c++ make pcre pcre-devel expat-devel perl
Enter this command to solve the installation problem!!!

solve!

How to Solve Unzip Error: tar: Error is not recoverable: exiting now

Tar: error is not recoverable: exiting now

[ root@node04 soft]# tar -zxvf apache-tomcat-8.0.53-x64.tar.gz

Error message:

gzip: stdin has more than one entry–rest ignored tar: Child returned status 2 tar: Error is not recoverable: exiting now

Solution 1: remove the Z parameter and use tar – xvf to decompress

Find or report an error.

Solution 2: use the unzip command.

Problem solving.

If you cannot use the unzip command, first follow:

yum install -y unzip zip

[Solved] Error calling ICU Library: libicudata.so.51: internal error

I recently ported a front-end that depends on the icu library, and after successful compilation I got the following error
error while loading shared libraries: /usr/lib/libicudata.so.51: internal error
I thought it was a problem with icu version, and tried various versions without success.
I finally found the problem after a long day of searching, the config should add –with-data-packaging=files
The original config configurationICU_CONF_OPT = –with-cross-build=$(HOST_ICU_DIR)/source –disable-samples \
–disable-tests
New Configuration:
ICU_CONF_OPT =     –host=arm-linux-gnueabihf \
–with-cross-build=$(HOST_ICU_DIR)/source \
–prefix=$(STAGING_DIR)/usr  \
–with-data-packaging=files \
–disable-samples \
–disable-tests

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

The docker export container cannot be run after being imported: error response from daemon: no command specified

The docker export container cannot be run after being imported. An error is reported: error response from daemon: no command specified

According to the error message, the command can be run without specifying the command

[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
docker.io/ubuntu    latest              fb52e22af1b0        3 weeks ago         72.8 MB

[root@localhost ~]# docker run -itd docker.io/ubuntu:latest
7ce403eba8d89127395e057eb4d6cf7eb2374e40214ce6575a29e755b707ca23

[root@localhost ~]# docker ps
CONTAINER ID        IMAGE                     COMMAND             CREATED             STATUS              PORTS               NAMES
7ce403eba8d8        docker.io/ubuntu:latest   "bash"              4 seconds ago       Up 3 seconds                            hungry_babbage
[root@localhost ~]# docker export -o test.tar 7ce403eba8d8

[root@localhost ~]# ls
anaconda-ks.cfg  test.tar

[root@localhost ~]# docker import test.tar test/ubuntu:v0.1
sha256:c3d604273769f7a74126b27f29c8cecd055fc18b10c943da0c0528dc28520a60

[root@localhost ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
test/ubuntu         v0.1                c3d604273769        4 seconds ago       72.8 MB
docker.io/ubuntu    latest              fb52e22af1b0        3 weeks ago         72.8 MB

[root@localhost ~]# docker run -itd test/ubuntu:v0.1
/usr/bin/docker-current: Error response from daemon: No command specified.
See '/usr/bin/docker-current run --help'.

# add /bin/bash work
[root@localhost ~]# docker run -itd test/ubuntu:v0.1 /bin/bash
5b7dca448a1400716fa931463c2c314e0e59c7888fa77d5b182e72d911122966

[root@localhost ~]# docker ps
CONTAINER ID        IMAGE                     COMMAND             CREATED             STATUS              PORTS               NAMES
5b7dca448a14        test/ubuntu:v0.1          "/bin/bash"         3 seconds ago       Up 2 seconds                            zen_varahamihira
7ce403eba8d8        docker.io/ubuntu:latest   "bash"              5 minutes ago       Up 5 minutes                            hungry_babbage

Using JWT of distributed deployment services Error: JWT check failure:

===2021-09-18 15:55:14.445 ERROR [http-nio-8014-exec-6] com.croot.common.utils.JwtTokenKit Line:72 – JWT Check Failure:
io.jsonwebtoken.PrematureJwtException: JWT must not be accepted before 2021-09-18T15:55:42Z. Current time: 2021-09-18T15:55:14Z, a difference of 27556 milliseconds. Allowed clock skew: 0 milliseconds.
Synchronize server time
Write a script:

Add permissions for the script to be executable by all users for later testing: chmod a+x test.sh
Stop the crond service: service crond stop
Add timed tasks:
[root@CloudDeskTop install]# crontab -e

* * * * * /bin/sh /install/test.sh

View scheduled tasks:
[ root@CloudDeskTop install]# crontab -l

* * * * * /bin/sh /install/test.sh

View which users have scheduled tasks:
[ root@CloudDeskTop ~]# ls /var/spool/cron
root

Start the crond service: service crond start

Check whether there is a test.log file in the/install/directory;

Display the contents of test.log in real time: Tail – F test.log