Category Archives: Linux

[GuzzleHttp\Exception\RequestException] cURL error 60: SSL certificate problem: certificate has expired (How to Solve)

How to Solve Error: [GuzzleHttp\Exception\RequestException] cURL error 60: SSL certificate problem: certificate has expired

This problem is because there is a ROOT root certificate expired
Usually it will be automatically updated with the package
But the DST Root CA X3 that let's encrypt uses this time is out of date



# DST Root CA X3
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

Because our systems are all unified CentOS8,

Then remember to restart PHP FPM after the update is complete, otherwise the certificate file will not be reloaded

[Solved] Github Action Error: Error: Unable to process file command ‘env’ successfully.

I need to read text from a local file, usually in bash execution cat ./fileName, so I took it for granted

echo "FILE_TEXT=$(cat ./file.txt)" >> $GITHUB_ENV

Then report the error as follows

Error: Unable to process file command 'env' successfully.
Error: Invalid environment variable format 'xxxxxxxxxx... '

The reason is because setting $GITHUB_ENVthe environment variable does not directly support multiple lines of text, plus get EOFthe job
following this set on it

name: "Read the text"
run: |
       echo 'FILE_TEXT<<EOF' >> $GITHUB_ENV
       cat ./file.txt >> $GITHUB_ENV
       echo 'EOF' >> $GITHUB_ENV

run: |It is to run multi-line shell commands. Local variables can be obtained in this step. Those who need to obtain values ​​across steps must be written $GITHUB_ENVto, and then the reading method is as follows:

${{env.FILE_TEXT}} 

Bringing up interface eth0: Error: No suitable device found: no device found for connection ‘System eth0’. [FAILED]

1. Description: virtual machine configuration IP restart network card: service network restart error message:

The error information is as follows:

[root@localhost network-scripts]# vim ifcfg-eth0
[root@localhost network-scripts]# 
[root@localhost network-scripts]# service network restart
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Error: No suitable device found: no device found for connection 'System eth0'.
                                                           [FAILED]

2. This problem occurs because the network card actually assigned to the virtual machine does not match the network card information in the configuration file

1. The actual network card information allocated to the virtual machine is: [hwaddr 00:0c: 29:7f: B6: FF]

root@localhost /]# ifconfig
eth1      Link encap:Ethernet  HWaddr 00:0C:29:7F:B6:FF  
          inet6 addr: fe80::20c:29ff:fe7f:b6ff/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:68 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:7028 (6.8 KiB)  TX bytes:1620 (1.5 KiB)
          Interrupt:19 Base address:0x2024 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:48 errors:0 dropped:0 overruns:0 frame:0
          TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3760 (3.6 KiB)  TX bytes:3760 (3.6 KiB)

2. The network card information in the configuration file is:

vim /etc/sysconfig/network-script/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="static"
IPV4_FAILURE_FATAL="yes"
BOOTPROTO="dhcp"
HWADDR="00:0C:29:7F:B6:8A"
IPV6INIT="yes"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
UUID="5c4e89fb-eced-4d66-962a-e5f6e565ec26"
IPADDR="192.168.25.135"
NETMASK="255.255.255.0"
GATEWAY="192.168.25.1"
DNS1="192.168.25.1"

3. Modification method: the above configuration files are configured according to the network card actually allocated to the virtual machine, that is:

HWADDR="00:0C:29:7F:B6:8A" Modify to HWADDR="00:0C:29:7F:B6:FF"
Save the pair to exit: restart the NIC: service network restart Correct

[Solved] git pull Error: error: Your local changes to the following files would be overwritten by merge

The reason for this error is that you have modified the file locally and remotely at the same time

Solution:

Keep local files

git stash
git pull origin master
git stash pop

Do not keep the local file (restore the local file to the previous version and pull down the remote modification)

git reset --hard
git push origin master

 

[Solved] carla-simulator Start Error: libomp.so.5 file cannot be found

ubuntu20. 04 because the system has been upgraded, some useless packages have been automatically uninstalled, and the Carla that can run originally cannot be started and an error is reported:

/opt/carla-simulator/CarlaUE4/Binaries/Linux/CarlaUE4-Linux-Shipping: error while loading shared libraries: libomp.so.5: cannot open shared object file: No such file or directory

Solution:

Try reinstalling the libosm5 package

sudo apt-get install libomp5

After the installation is completed, start Carla again successfully.

[Solved] npm WARN Local package.json exists, but node_modules missing, did you mean to install?

Error:
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev: `webpack-dev-server --inline --progress --config build/
onf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging ou
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

Solution:

Specify to the current directory, and the installation depends on

npm install

[Solved] Linux zbar Compile error: /usr/include/x86_64-linux-gnu/bits/stdio2. h:143:1: error: expected identifie….

Error message:

In file included from /usr/include/stdio.h:937:0,
                 from zbar/debug.h:60,
                 from zbar/scanner.c:34:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:140:1: error: expected identifier or ‘(’ before ‘{’ token

First, in execution/ When configuring, pay attention to the final output result to ensure that the normal execution is completed. The normal completion should have no error character, for example:

...
configure: creating ./config.status
config.status: creating Makefile
config.status: creating zbar.pc
config.status: creating zbar-gtk.pc
config.status: creating zbar-qt.pc
config.status: creating doc/doxygen.conf
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing doc/version.xml commands
config.status: executing doc/reldate.xml commands

please verify that the detected configuration matches your expectations:
------------------------------------------------------------------------
X                 --with-x=yes
pthreads          --enable-pthread=yes
v4l               --enable-video=no
        => zbarcam video scanner will *NOT* be built
jpeg              --with-jpeg=yes
Magick++          --with-imagemagick=yes
Python            --with-python=no
GTK+              --with-gtk=yes
        => the PyGTK widget wrapper will *NOT* be built
Qt4               --with-qt=no
        => the Qt4 widget will *NOT* be built

If the message is unable to find ImageMagick, install ImageMagick and libmagickwand dev

apt-get install imagemagick libmagickwand-dev

If: error: no suitable Python interpreter found

Note: there is no Python environment or the required versions of existing Python and ZBar are inconsistent. If Python is not involved, add the parameter — without python

If: configure: error: Test for video support failed
rebuild your kernel to include video4linux support or
configure –disable-video to skip building video support.

Add — Disable video parameter

For example, my final execution /Configure parameter:

./configure FLAGS="" --disable-video --without-python --without-qt

[Solved] Nginx Startup Error: nginx: [alert] could not open error log file: open() “/usr/local/nginx/logs/error.log“ failed

Nginx Startup Error: nginx: [alert] could not open error log file: open() “/usr/local/nginx/logs/error.log“ failed

nginx: [alert] could not open error log file: open() "/usr/local/nginx/logs/error.log" failed (2: No such file or directory)
2021/12/06 20:12:14 [emerg] 466858#0: mkdir() "/usr/local/nginx/client_body_temp" failed (2: No such file or directory)

Error Description: the error path is/use/local. It is found that the file location is inconsistent

Solution: move Nginx to local and start it again

[Solved] Etcd cluster startup error: k8s-master01 systemd: Failed to start Etcd Service.

[root@k8s-master01 ~]# tail -f /var/log/messages
Dec  6 16:39:30 k8s-master01 etcd: setting maximum number of CPUs to 4, total number of available CPUs is 4
Dec  6 16:39:30 k8s-master01 etcd: ignoring peer auto TLS since certs given
Dec  6 16:39:30 k8s-master01 etcd: peerTLS: cert = /etc/kubernetes/pki/etcd/etcd.pem, key = /etc/kubernetes/pki/etcd/etcd-key.pem, trusted-ca = /etc/kubernetes/pki/etcd/etcd-ca.pem, client-cert-auth = false, crl-file =
Dec  6 16:39:30 k8s-master01 etcd: ignoring client auto TLS since certs given
Dec  6 16:39:30 k8s-master01 etcd: pprof is enabled under /debug/pprof
Dec  6 16:39:30 k8s-master01 etcd: The scheme of client url http://127.0.0.1:2379 is HTTP while peer key/cert files are presented. Ignored key/cert files.
Dec  6 16:39:30 k8s-master01 etcd: The scheme of client url http://127.0.0.1:2379 is HTTP while client cert auth (--client-cert-auth) is enabled. Ignored client cert auth for this url.
Dec  6 16:39:30 k8s-master01 etcd: name = k8s-master01
Dec  6 16:39:30 k8s-master01 etcd: data dir = /var/lib/etcd
Dec  6 16:39:30 k8s-master01 etcd: member dir = /var/lib/etcd/member
Dec  6 16:39:30 k8s-master01 etcd: dedicated WAL dir = /var/lib/etcd/wal
Dec  6 16:39:30 k8s-master01 etcd: heartbeat = 100ms
Dec  6 16:39:30 k8s-master01 etcd: election = 1000ms
Dec  6 16:39:30 k8s-master01 etcd: snapshot count = 5000
Dec  6 16:39:30 k8s-master01 etcd: advertise client URLs = https://192.168.1.110:2379
Dec  6 16:39:30 k8s-master01 etcd: cannot access data directory: directory "/var/lib/etcd","drwxr-xr-x" exist without desired file permission "-rwx------".
Dec  6 16:39:30 k8s-master01 systemd: etcd.service: main process exited, code=exited, status=1/FAILURE
Dec  6 16:39:30 k8s-master01 systemd: Failed to start Etcd Service.
Dec  6 16:39:30 k8s-master01 systemd: Unit etcd.service entered failed state.
Dec  6 16:39:30 k8s-master01 systemd: etcd.service failed.

Solution:

I read the official documents and said that the permissions are wrong. I want to give 700 permissions

# Then restart etcd
[root@k8s-master01 ~]# chmod 700 /var/lib/etcd/ -R

[Solved] item2 Error: a session ended very soon after starting. check that the command in profile default

At the weekend, the Alibaba cloud ECS instance password was modified. When Item2 was used to remotely connect to the server again, the following error was reported:

reason

Every time a new connection ssh remote use, will be in ~/.ssh/known_hoststhe secret documents generated ssh key pair on updating the remote password, you need to delete the corresponding ssh keys. Otherwise, an error will be reported.

Solution

Locate the file ~ /.SSH/known_Hosts, find the IP you want to connect remotely and delete the corresponding secret key. For example, I connect remotely 47.98.202.133, and delete the box in the following figure: