Tag Archives: linux

[Solved] error while loading shared libraries: libjson.so.0: cannot open shared object file: No such file or

error while loading shared libraries: libjson.so.0: cannot open shared object file: No such file or

Solution:

sudo vim  /etc/ld.so.conf

Add /usr/local/lib to the file, which is the path is libjson.so.0 located

include /etc/ld.so.conf.d/*.conf 
/usr/local/lib

Finally, the terminal inputs sudo ldconfig

[Solved] Error (suppressible): (vsim-12110) All optimizations are disabled because the -novopt option is in effect…

Questasim Error(vsim-12110)

Questasim simulation optimization acceleration problem (object no signal, could not see waveform)

Makefile script:

Compilation error:

Solution:

Remove -novopt, which is no longer used in modelsim after version 10.7, so as long as you do not use -novopt, no error will be reported. So how can we see the signal and see the waveform while using optimization?

Here I modify modelsim.ini

Find modelsim.ini file address

Modify VoptFlow = 1

In addition, you can replace -novopt with -voptargs= “+acc”

[Solved] Centos7 xmapp Install Error: error while loading shared libraries: libc.so.6

1. Version information:

CentOS version: CentOS release 6.9 (final)

xmapp version: xampp-linux-x64-5.6.40-1-installer.run

2. Error message:

[root@localhost ~]# /opt/lampp/lampp
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/bin/bash: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

id: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/share/xampp/xampplib: line 11: test: -ne: unary operator expected
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/httpd: error while loading shared libraries: librt.so.1: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: hostname: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
XAMPP: /bin/sh: error while loading shared libraries: libdl.so.2: cannot open shared object file: No such file or directory
egrep: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
netstat: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
/opt/lampp/bin/gettext: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory

3. Solution:

1. Open /opt/lampp/lampp

vim /opt/lampp/lampp

2. Edit
Modify this line

export LD_ASSUME_KERNEL=2.2.5

to

export LD_ASSUME_KERNEL=2.8.0

Find a word in the file [under the command line/keyword, enter to find, enter n to find the next]

[Solved] Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to

Cluster calico deployed by kuberadm runs incorrectly

report errors:

1, check calico

kubectl get pods -n kube-system

Calico-node 0/1 Running

2. check the log

kubectl describe calico-node-gdv9r -n kube-system

Calico error:
Readiness probe failed: calico/node is not ready: BIRD is not ready: Error querying BIRD: unable to connect to BIRDv4 socket: dial unix /var/run/bird/bird.ctl: connect: no such file or directory

Solution:

1. Remove the DOWN NIC/interface that Docker and Calico errors.

ip link docker0

2, delete Calico pod (pod will be rebuilt and run by k8s cluster after deletion)

kubectl delete pod calico-node-gdv9r -n kube-system

3, check Calico again and find it is normal</ font>

kubectl get pods -n kube-system

[Solved] pymysql.err.OperationalError: (1045, “Access denied for user ‘root‘@‘192.168.118.44‘

Error: pymysql.err OperationalError: (1045, “Access denied for user ‘root’@‘192.168.118.44’ (using password: YES)”)

Possible problems:
1. Firewall blocking,
Solution: log in to the server and turn off the firewall

systemctl stop firewalld.service

2. User empowerment (the root user I use here)
Solution: log in to the MySQL database for empowerment

grant all privileges on *.* to 'root'@'%' identified by 'password';
flush privileges;

3. Check whether the password is entered incorrectly

Linux Mint: linuxbrew Install and Boot Error [How to Solve]

Linux Mint installs linuxbrew and resolves the boot error

Errors are reported as follows

 

Solution:
Checking the **.profile file** in the user directory, I found that eval was linked to the previous line, presumably because of a bug in the installation of the jetbrains toolbox

change Eval to the next line and save it (with administrator permission)

[Solved] fontconfig cross-compilation Error: PRI_CHAR_WIDTH_STRONG 

make report an error as below:
“fontconfig-2.12.1/src/fcmatch.c:324:63: error: ‘PRI_CHAR_WIDTH_STRONG’ undeclared here (not in a function); did you mean ‘PRI_WIDTH_STRONG’?”

"fontconfig-2.12.1/src/fcmatch.c:324:63: error: ‘PRI_CHAR_WIDTH_STRONG' undeclared here (not in a function); did you mean ‘PRI_WIDTH_STRONG’?"

 

Solution:
Enter the source code directory. My path is
1.
fontconfig-2.12.1/fontconfig/fontconfig.h
Found #define FC_CHAR_WIDTH “charwidth” /* Int / deleted
Add #define FC_CHARWIDTH “charwidth” / Int */
#define FC_CHAR_WIDTH FC_CHARWIDTH
2.
fontconfig-2.12.1/src/fcobjs.h
Find FC_OBJECT (CHAR_WIDTH, FcTypeInteger, NULL) and delete it.
Add FC_OBJECT (CHARWIDTH, FcTypeInteger, NULL)
3.
fontconfig-2.12.1/src/fcobjshash.gperf
Find “CHARWIDTH”, FC_CHAR_WIDTH_OBJECT and delete it.
Add “charwidth”,FC_CHARWIDTH_OBJECT
4.
fontconfig-2.12.1/src/fcobjshash.h
Find {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHAR_WIDTH_OBJECT}, delete
add {(int)(long)&((struct FcObjectTypeNamePool_t *)0)->FcObjectTypeNamePool_str45,FC_CHARWIDTH_OBJECT},
End, make && make install successful
is to modify and replace a few macro definitions, you can happily edit cairo!
Although the high version of fontconfig does not have this error, but the cross-compiler reported that the other failed to solve

 

[Solved] Mybatis Error: CannotFindDataSourceException: dynamic-datasource can not find primary datasource

Problem background

When using mybatis, an error is reported that the master data source cannot be found:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: com.baomidou.dynamic.datasource.exception.CannotFindDataSourceException: dynamic-datasource can not find primary datasource
### The error may exist in com/lanran/transactional/dao/PaymentMapper.java (best guess)
### The error may involve com.lanran.transactional.dao.PaymentMapper.insertBatchSomeColumn
### The error occurred while executing an update
### Cause: com.baomidou.dynamic.datasource.exception.CannotFindDataSourceException: dynamic-datasource can not find primary datasource

Solution

1. Because the multi-source configuration dependency of mybatisplus is added, but the configuration file does not write the related configuration of multi-source, an error is reported

        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
            <version>3.5.0</version>
        </dependency>

Method 1: if you don’t use multi-source configuration, remove this dependency
Method 2:  application set multi-source configuration

server:
  port: 40001

spring:
  datasource:
    druid:
      stat-view-servlet:
        enabled: true
    dynamic:
      # Configure the global druid parameter, please configure as needed
      druid:
        initial-size: 5
        max-active: 8
        min-idle: 3
        max-wait: 1000
        validation-query: 'select 1'
      datasource:
        master:
          username: root
          password: 123456
          url: jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
          driver-class-name: com.mysql.cj.jdbc.Driver
        slave_1:
          username: root
          password: 123456
          url: jdbc:mysql://localhost:3306/test2?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC
          driver-class-name: com.mysql.cj.jdbc.Driver

[Solved] make menuconfig Error: recipe for target ‘menuconfig‘ failed

when using make menuconfig to configure Linux corl error: target ‘menuconfig’ failed to recipe.


Solution:

1. Check whether the libncurses5-dev library is installed

If it’s not installed, install with the command: sudo apt-get install libncurses5-dev

2. If it’s installed, it’s because the terminal window is too small. It’s solved by enlarging the window

 

[Solved] E xx: xxxx:xx ERR thread 0x536753929472 setscheduler failed Operation not permitted

E xx: xxxx:xx ERR thread 0x536753929472 setscheduler failed Operation not permitted

The “setscheduler failed Operation not permitted” error occurred when setting the thread priority via sched_setscheduler.

int ret = sched_setscheduler(pthread_gettid_np((pthread_t)pHandle), SCHED_RR, &prio);

 

Solution:
add the following contents to the process startup parameters:

capabilities SYS_NICE

init.target.rc

service xxxxxx /system/vendor/bin/xxxxxx
    class core
    user system
    group camera input graphics
    disabled
    onrestart restart evs_driver
    onrestart restart qcarcam_hal
    capabilities SYS_NICE

Virtual machine failed to start network service error: ob for network.service failed because the control process exited with error code

About CentOS 7 virtual machine startup network service startup failure: ob for network service failed because the control process exited with error code

As shown in the following figure:

Question:

When using CentOS 7 system, after changing the static IP, it is found that the network service cannot be restarted, and after using the IP addr or ipconfig command, it is found that the changed static IP address is not displayed and mysteriously disappears. The connection to the external network is also different, and the Ping is blocked.

Error reason:

There is a conflict between NetworkManager and Network, there are two network management tools on CentOS system, NetworkManager and Network, if both of them are configured, it will cause a conflict between them. As we usually use Network to configure our virtual machine static ip address, but sometimes our improper operation will cause NetworkManager to configure automatically, so there is a conflict between the two. Possible reasons for this are: we shut down the virtual machine without shutting it down first or we don’t use the poweroff command to shut down the machine.

Solution:

Just turn off the NetworkManager service directly, that is, carry out the following steps:
solution 1:
①, service NetworkManager stop # turn off the NetworkManager service
②, chkconfig NetworkManager off # prohibit startup
③ restart the system

solution 2:
② Choose one of the following commands: (a temporary modification, a permanent modification)
systemctl stop networkmanager # temporarily close the service
systemctl disable networkmanager # permanently close the service
② restart the system