Tag Archives: linux

[Solved] Error :: You must put some ‘source‘ URIs in your sources.list

Solution:

Just enter the following three lines.

sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
sudo apt-get update

Users who are not logged in can copy the code below.

sudo cp /etc/apt/sources.list /etc/apt/sources.list~
sudo sed -Ei ‘s/^# deb-src /deb-src /’ /etc/apt/sources.list
sudo apt-get update

Reference:
https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list

[Solved] xdd-plus-fetch qrcode error: Packet timed out,2-error: unknown flag

On xdd-plus-21-12-08, two errors were reported in running XDD. Jiqiren also hung up, no messages were sent, and the service stopped itself.
the following two errors were reported
fetch QRcode error: packet timed out,
2-error: unknown flag

With the help of some Qun friends, the tutorial is summarized as follows
1 Download
https://github.com/764763903a/xdd-plus/releases/tag/v1.7

cd ~
dowload Time is slow, wait patiently. . . .

wget https://github.com/764763903a/xdd-plus/archive/refs/tags/v1.7.tar.gz

tar xzvf v1.7.tar.gz

cd xdd-plus-1.7/qbot/

wget https://github.91chi.fun//https://github.com//764763903a/xdd-plus/releases/download/v1.7/config.yml
This file only needs to change which line of uin, that is, which line of QQ account, and replace it with your own (robot) QQ

[root@VM-4-10-centos qbot]# cat config.yml
# go-cqhttp default configuration file

account: # Account related
   uin: 1565396344 # QQ account
   password:'' # Use scan code to log in when the password is empty
   encrypt: false # Whether to enable password encryption
   status: 0 # Online status Please refer to https://docs.go-cqhttp.org/guide/config.html#Online status
   relogin: # Reconnect settings
     delay: 3 # The first reconnection delay, in seconds
     interval: 3 # Reconnect interval
     max-times: 0 # Maximum number of reconnections, 0 means unlimited
--------------------

cd ..
wget https://github.com.cnpmjs.org/764763903a/xdd-plus/releases/download/v1.7/xdd-linux-amd64
chmod +x  xdd-linux-amd64

cd conf/
cp demo_app.conf app.conf
Here, copy the configuration file of the old version of conf.yaml to the conf/ directory of the new version, and it is not too troublesome to reconfigure
cp ~/xdd-plus/conf/config.yaml. # There is a dot at the end
cd /root/xdd-plus-1.7/
./xdd-linux-amd64
Then scan the QR code to log in to jiqiren's QQ.
Ctrl + c
nohup ./xdd-linux-amd64 &
(shang above Ctrl +c may need to log in again after exiting, here cat nohup.out, and then scan the code again, this is the log output file)

vim conf/config Yaml
change this in the slow query configuration
later: 1 # delay to prevent Black IP. Set the default 60 to 1. The unit is seconds

Then log in to QQ and leave a message if you have other questions

error while loading shared libraries: libz.so.1 [How to Solve]

Error in compiling Quanzhi Linux kernel

  CC      scripts/mod/empty.o
  HOSTCC  scripts/genksyms/genksyms.o
  SHIPPED scripts/genksyms/lex.lex.c
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/mod/mk_elfconfig
  HOSTCC  scripts/recordmcount
  SHIPPED scripts/genksyms/keywords.hash.c
/home/ql/linux/H3Core/lichee/out/sun8iw7p1/dragonboard/common/buildroot/external-toolchain/bin/../libexec/gcc/arm-linux-gnueabi/4.6.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make[2]: *** [scripts/Makefile.build:308:scripts/mod/empty.o] error 1
make[2]: *** Waiting for unfinished tasks...
  SHIPPED scripts/genksyms/parse.tab.h
  SHIPPED scripts/genksyms/parse.tab.c
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTCC  scripts/genksyms/parse.tab.o
make[1]: *** [scripts/Makefile.build:443:scripts/mod] error 2
make[1]: *** Waiting for unfinished tasks...
  CC      kernel/bounds.s
/home/ql/linux/H3Core/lichee/out/sun8iw7p1/dragonboard/common/buildroot/external-toolchain/bin/../libexec/gcc/arm-linux-gnueabi/4.6.3/cc1: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
make[1]: *** [/home/ql/linux/H3Core/lichee/linux-3.4/./Kbuild:36:kernel/bounds.s] 错误 1
make: *** [Makefile:985:prepare0] error 2
make: *** Waiting for unfinished tasks...
  HOSTLD  scripts/genksyms/genksyms
make: *** [Makefile:506:scripts] error 2

Execute the following instructions to install the library
sudo apt get install lib32z1

[Solved] Starting MySQL… ERROR The server quit without updating PID file

An error is reported when starting MySQL after the Linux server is restarted. The error information is as follows:

Starting MySQL… ERROR! The server quit without updating PID file (/usr/local/mysql/data/VM_0_9_centos.pid).

Solution:

1. Modify the MySQL configuration file in/etc/my cnf。 Add the following configuration:

basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
log-error = /usr/local/mysql/error.log
pid-file = /usr/local/mysql/mysql.pid
user = mysql
tmpdir = /tmp

2. Initialize and execute some commands in/usr/local/MySQL/scripts:

./mysql_install_db --user=mysql --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --pid-file=/usr/local/mysql/data/mysql.pid --tmpdir=/tmp

This database can be started normally.

However, due to the reinitialization of the database, you will be prompted that you do not have permission when accessing the previous database.

Two commands are required:

chown -R mysql:mysql /usr/local/mysql/
chmod -R 755 /usr/local/mysql/

Tip: the directories here are all my real MySQL installation directories. The directories installed by each person may be different.

[Solved] docker: Error response from daemon: OCI runtime create failed: container_linux.go:380

docker: Error response from daemon: OCI runtime create failed: container_ linux. Go: 380 error reporting solution

Docker installs mysql5.0 7 fails to run and reports OCI runtime create failed

Pull mysql5 on docker 7 no problem
execute the code and report an error

docker run -p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7

CD goes to/mydata/MySQL/conf and finds that it is not mounted correctly, and there is no file path of/etc/MySQL

Error reason: the docker version needs to be downgraded or reinstalled because of the compatibility between Linux and docker

There are two solutions:

Reinstall the docker of the specified version and demote the docker to the specified version

The first method: uninstall and reinstall:

//Step 1: Uninstall docker

//List the packages downloaded by docker
sudo yum list installed | grep docker

//remove all the above related installed packages sudo yum -y remove "above show related packages"
sudo yum -y remove docker-ce.x86_64
sudo yum -y remove docker-ce-cli.x86_64

// Remove related images and containers
sudo rm -rf /var/lib/docker

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-selinux \
                  docker-engine-selinux \
                  docker-engine
                 
// Test for deletion of
docker -v


// Step 2: reinstall the specified version of docker

// Install some necessary system tools.
sudo yum install -y yum-utils device-mapper-persistent-data lvm2

// Add software source information: sudo yum-config -y
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

//Update the yum cache.
sudo yum makecache fast

//View the available versions of Docker-ce: sudo yum list docker-ce
yum list docker-ce --showduplicates | sort -r

// If you need to show only table versions, you can turn off the list for test versions: yum list
sudo yum-config-manager --enable docker-ce-edge
sudo yum-config-manager --enable docker-ce-test

//Update the yum package index
yum makecache fast

//Install the specified version of docker-ce: sudo yum install -y docker-ce
sudo yum install -y docker-ce-17.03.2.ce-1.el7.centos 

// Error: If the installation of the specified version of docker shows that the specified version of the docker-ce-selinux dependency package needs to be installed, please install.
yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm 

Then pull MySQL again

docker pull mysql:5.7

The second method: downgrade docker to the specified version:

//Stop docker
sudo systemctl stop docker
//Enter the downgrade command
yum downgrade --setopt=obsoletes=0 -y docker-ce-17.03.2.ce-1.el7 docker-ce-selinux-17.03.2.ce-1.el7 containerd.io
//Checking the docker version
docker -v

Recreate the container and start

docker run -p 3306:3306 --name mysql \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql \
-e MYSQL_ROOT_PASSWORD=root \
-d mysql:5.7

success!!

[Solved] yocto Compile Error: ERROR: libtinyxml2-XXX do_fetch: Fetcher failure for URL

Yocto compilation, when changing the GIT address to the local server address in the BB file, there is a series of error prompts, the main idea of which is:

ERROR: libtinyxml2-XXX do_ fetch: Fetcher failure for URL:’ git://git @XXX/tinyxml2. git’. Unable to fetch URL from any source.

I can succeed in clone alone, but not in yocto. I guess it may be because there is no specified protocol and branch. Just add it.

Solution:

SRC_URI = ” git://git @XXX/tinyxml2.git “change to” git://git @XXX/tinyxml2.git;protocol=ssh;branch=master”

Yocto’s information is too few. It’s hard to check if there are problems. I share what I have encountered. I hope more people can share it, so that problems can be solved in the future.

[Err] [REST.cc:205] Error in REST request Gazebo Startup Error

Question

An error is reported when gazebo is started. The error is as follows:

[Err] [REST.cc:205] Error in REST request

libcurl: (51) SSL: no alternative certificate subject name matches target host name 'api.ignitionfuel.org'

Solution:

sudo vim ~/.ignition/fuel/config.yaml

https://api.ignitionfuel.org

[Solved] ERROR: Cannot uninstall ‘PyYAML‘. It is a distutils installed project and thus we cannot accurately

ERROR: Cannot uninstall ‘PyYAML’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Problem Description.
When installing transformers, an error is reported: “ERROR: Cannot uninstall ‘PyYAML’. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.”

pip install transformers 

Solution:

You only need to modify the original installation command to:

pip install transformers --ignore-installed PyYAML

Just.

Similar problems can be solved in this way.

[Solved] curl: (6) Could not resolve host: harbor.od.com; Unknown error

implement

curl harbor.od.com

The following error occurred

curl: (6) Could not resolve host: harbor.od.com; Unknown error

The reason is that there is an error in DNS

Open DNS profile

vim /etc/resolv.conf

Find the following. It is found that the DNS is inconsistent with your own configuration.

Modify the content behind the nameserver

Run again and you’ll succeed

Error: Node Sass does not yet support your current environment: Linux 64-bit with Unsupported runtim

Error: node sass does not yet support your current environment: Linux 64 bit with unsupported runtime (93)

It is taken for granted that the versions of node and node sass do not match.

It is useless to refer to various upgrades and demotions of the forum. mmp.

There’s really no way to install sass:

npm install sass

My project will automatically use sass. If you are worried or node sass is still working, you can also uninstall node sass:

npm uninstall node-sass

At this point, your project should run normally. Anyway, this is how I run packaging.

Reference articles:
https://zhuanlan.zhihu.com/p/405365755