Tag Archives: linux

[Solved] Linux – error: cannot open Packages database in /var/lib/rpm

Error Message:

[root@VM_0_17_centos rabbitmq]# yum install xxx.rpm
error: rpmdb: BDB0113 Thread/process 27590/140471762446144 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 –  (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed

Solution:

[root@VM_0_17_centos]# cd /var/lib/rpm
[root@VM_0_17_centos rpm]# ls
Basenames  Conflictname  __db.001  __db.002  __db.003  Dirnames  Group  Installtid  Name  Obsoletename  Packages  Providename  Requirename  Sha1header  Sigmd5  Triggername
[root@VM_0_17_centos rpm]# rm -rf __db*
[root@VM_0_17_centos rpm]# rpm --rebuilddb

[Solved] Error response from daemon: manifest for nvidia/cuda:latest not found: manifest unknown: manifest

Reason:

        The “latest” tag for CUDA, CUDAGL, and OPENGL images has been deprecated on NGC and Docker Hub

CUDA, CUDAGL and OPENGL images in Docker Hub have deprecated the “latest” tag and use the

docker pull nvidia/cuda

Or specify in dockerfile

FROM nvidia/cuda:latest

Will appear

Error response from daemon: manifest for nvidia/cuda:latest not found: manifest unknown: manifest unknown

Error

Solution:

Find the CUDA version corresponding to your system in supported tags, and change the latest in NVIDIA/CUDA: latest to the corresponding version

For example:

nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04

Weblogic Deployment Error: The most likely cause is an error in the network configuration of this machine.

The most likely cause is an error in the network configuration of this machine when deploying Weblogic in Linux environment; As shown in the following figure:

solution: VI enter/etc/hosts and configure your current login host name; (it’s better to switch to the root account for modification here)

view the host name, as shown in the following figure:

[Realtek sdk-4.4.1] RTL8198D How to Fix pptp/l2tp HW checksum error issue

Problem description

For PPTP/L2TP device interfaces, the FC driver should not set netif_F_HW_Csum, because HW does not support calculating the TCP/UDP checksum encapsulated by PPTP/L2TP header. It provides a function to set which device interface does not set netif_F_HW_CSUM

Solution

File path: rtl819x/linux-4.4.x/drivers/net/ethernet/realtek/rtl86900/FleetConntrackDriver/src/rtk_fc_helper_ps.c

int rtk_set_hw_csum(char *dev_name)
{
    // It does not support hw checksum feature for wlan and pptp/l2tp interface
    // for RTK use application: PPP9~12 are used for PPTP/L2TP, hw checksum offload didn't
        support inner header update so we must NOT turn on it.
    if(strncmp(dev_name, "wlan", 4) && strncmp(dev_name, "ppp9", 4) && strncmp(dev_name,
        "ppp10", 5) && strncmp(dev_name, "ppp11", 5) && strncmp(dev_name, "ppp12", 5))
        return TRUE;
    else
        return FALSE;
}

SDK, PPTP/L2TP device interface name is ppp9 ~ ppp12. Therefore, if you modify the PPTP/L2TP device interface name (not ppp9 ~ ppp12), you should also modify the function RTK_set_hw_csum().

Error response from daemon: failed to parse mydockerfile-centos: ENV must have two arguments

This problem occurred when I was trying to create my own dockerfile ready to execute build

Error response from daemon: failed to parse mydockerfile-centos: ENV must have two arguments

The question is shown in the figure. This question means  

  At this time, we found that our env must require two parameters. Let’s take a look at our screenshot

As shown in the figure, there is only one parameter in my env. At this time, I found that I forgot the space

Make the following modifications

Obviously, I changed the env parameter to two parameters

  In the newly built dockerfile we created ourselves

It’s a success!

 

 

The CXX compiler identification is unknown CMake Error at CMakeLists.txt:11 (project):

Problem: when compiling GLOG 0.50, you should set the cross compiler. After setting the compiler, you will always report title errors. Enter the cross compiler on the Linux command line, but you can recognize the cross compiler;

The files for cross compiling are as follows:

the cross compiler can be recognized on the command line:

ubuntu0compile:~/glog-master/_build$ arm-linux-gnueabihf-g
arm-linux-gnueabihf-g++        arm-linux-gnueabihf-gcc-ar      arm-linux-gnueabihf-gcov        arm-linux-gnueabihf-gprof
arm-linux-gnueabihf-gcc         arm-linux-gnueabihf-gcc-nm      arm-linux-gnueabihf-gdb         
arm-linux-gnueabihf-gcc-4.9.4   arm-linux-gnueabihf-gcc-ranlib  arm-linux-gnueabihf-gfortran   

However, the following errors are reported during compilation:

ubuntu0compile:~/glog-master$ sudo cmake -H. -B_build -DCMAKE_TOOLCHAIN_FILE="${PWD}/toolchains/gcc-cxx11-crosscompiling.cmake" && cd -
-- The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:11 (project):
  The CMAKE_CXX_COMPILER:

    arm-linux-gnueabihf-g++

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "/home/glog-master/_build/CMakeFiles/CMakeOutput.log".
See also "/home/glog-master/_build/CMakeFiles/CMakeError.log".

The fundamental reason is that the cross compiler cannot be found. Under the path, only the directory of the cross compiler is set, either reset the environment variable, or set the path of the cross compiler to an absolute path; The problem is solved by setting the absolute path

Solve the software startup error while loading shared libraries: libgd. So. 2: cannot open shared object error

This error is reported when installing and starting nginx today: error while loading shared libraries: libgd. So. 2: cannot open shared object. I checked the relevant information on the Internet and solved it. This record also allows friends who encounter this problem to solve it quickly.

First, let’s talk about the solution to help those who are anxious to solve the problem. This is because the GD library is missing. Just install it. Installation method: 1. It is easiest to directly Yum install GD . 2. If Yum can’t search the installation package of GD library, you can manually download the corresponding RPM package at: http://rpmfind.net/linux/rpm2html/search.php?query=libgd.so.2 Install after downloading.

After installation, start nginx normally.

Let’s talk about the troubleshooting steps. You can refer to this method to solve similar problems in the future.

According to the error prompt, the libgd. So. 2 class library file failed to load. In this case, either lib is not installed or the installation location is not in the correct location. Check the class library files that nginx depends on through the LDD command:

ldd /usr/local/nginx/sbin/nginx  
linux-vdso.so.1 =>  (0x00007fffd5fb6000)  
libpthread.so.0 => /lib64/libpthread.so.0 (0x000000379e200000)  
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000393f200000)  
libpcre.so.0 => /lib64/libpcre.so.0 (0x00000033d5800000)  
libssl.so.10 => /usr/lib64/libssl.so.10 (0x0000003c60200000)  
libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x0000003df9800000)  
libdl.so.2 => /lib64/libdl.so.2 (0x000000390be00000)  
libz.so.1 => /lib64/libz.so.1 (0x0000003a25600000)  
libc.so.6 => /lib64/libc.so.6 (0x0000003a24200000)  
libgd.so.2 => not found  
/lib64/ld-linux-x86-64.so.2 (0x0000003a23e00000)  
libfreebl3.so => /lib64/libfreebl3.so (0x000000393ea00000)  
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x000000379fa00000)  
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x000000379d200000)  
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x000000379e600000)  
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x0000003df9c00000)  
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x0000003dfa800000)  
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x0000003dfa400000)  
libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003a26a00000)  
libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003df7c00000)  

This is not found, libgd. So. 2 = & gt; not found

A search on the Internet shows that this library comes with the GD installation package. If you confirm that GD has been installed, then this library is on the system. Find this file through the find command

find/-name 'libgd.so.2'

After finding it, you can copy it to the corresponding lib directory. If not, you can only reinstall it. How do we know the name of the package to be installed?Very simple. You can baidu search libgd. So. 2 to find out which installation package the library file comes from. Or you can check this website, http://rpmfind.net/linux/rpm2html/search.php?query=libgd.so.2 , it is found that this class library is from the GD installation package

First

Yum search GD search. If yes, you can directly Yum install GD

It’s OK. If not, you can also find the installation package that conforms to your own system through the website above (mainly depending on the operating system version number, 32-bit or 64 bit, and the new version is 64 bit), download it, and then install it through the corresponding command. Other class library files are missing, and the solution is similar.

dpkg:error: dpkg frontend is locked by another process

An error occurred while installing the. DEB file with dpkg
dpkg: error: dpkg frontend is locked by another process
solution:

sudo rm /var/lib/dpkg/lock
sudo rm /var/lib/dpkg/lock-frontend 
sudo rm /var/cache/apt/archives/lock 

You can remove the error
re enter the command to install DEB files to install

sudo dpkg -i xxxxxx.deb