Category Archives: Linux

[Solved] Error in OpenSSL when compiling code locally for raspberry pie

Error in OpenSSL when compiling code locally for raspberry pie

Error content

/usr/lib/gcc/arm-linux-gnueabihf/6/../../../libcurl.so: undefined reference to `[email protected]_1_1_1'
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../libcurl.so: undefined reference to `[email protected]_1_1_1'
/usr/lib/gcc/arm-linux-gnueabihf/6/../../../libcurl.so: undefined reference to `[email protected]_1_1_1'

Raspberry pie still reports an error when querying the OpenSSL version number locally

openssl version

Error content:

openssl: /usr/lib/arm-linux-gnueabihf/libssl.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)
openssl: /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.1: version `OPENSSL_1_1_1' not found (required by openssl)

Problem source:

After inquiry, it is mainly LD_LIBRARY_environment variable path is not specified, so OpenSSL is using the old system OpenSSL library

Solution:

Temporary solution: the terminal enters the following command to temporarily add the environment variables of OpenSSL library, but this method can only ensure that the current terminal is valid. If a new terminal is opened, an error will still be reported

export LD_LIBRARY_PATH=/usr/local/lib

Permanent solution: modify the. Bashrc hidden file in the working directory, taking raspberry pie as an example

vi /home/pi/.bashrc 
export LD_LIBRARY_PATH=/usr/local/lib 
source .bashrc 
sudo reboot 

You can also enter the following command

echo "export LD_LIBRARY_PATH=/usr/local/lib" >> ~/.bashrc 

After completing the above series of operations, you can enter the following commands to check whether it is normal

[email protected]:~ $ openssl
OpenSSL> version
OpenSSL 1.1.1l  24 Aug 2021
OpenSSL> q

Finally, the problem is solved and the compiled code is an error

Easycvr package Linux version error net_DVR_DownFileByName_Stop

As we all know, easycvr is a protocol integration platform that supports the most protocols among the platforms developed by tsingsee Qingxi video. Easycvr can be compatible with the private SDKs of Haikang and Dahua. At the same time, it also has the characteristics of gb28181, cascading of home protocols, voice intercom and so on. According to your own system, you can freely choose Windows version or Linux version for deployment.

When our developers packaged the Linux version of easycvr, easy appeared_ NET_ DVR_ DownFileByName_ Stop error.

As can be seen from the error, the prompt cannot find easy_NET_DVR_DownFileByName_Stop,
EASY_NET_DVR_DownFileByName_Start, NET_DVR_Startremoteconfig these three defined types.

In the corresponding source_hksdk_corresponding type is not found in the linux.go file, but it is used in the file.

So we need to find the source in the project_hksdk_Linux.go file, merge the missing code in source_hksdk_Add to linux.go. The reference code is as follows:

int Easy_NET_DVR_StartRemoteConfig(int loginhandle, int channelNum, int year, int month, int day, int hour, int minute, int second, char* path,int size){
	char pathArr[128];
	memset(pathArr, 0, sizeof(pathArr));
	memcpy(pathArr, path, size);
	NET_DVR_GET_FIGURE_COND cond;
	memset(&cond, 0 ,sizeof(NET_DVR_GET_FIGURE_COND));
	cond.dwLength = sizeof(NET_DVR_GET_FIGURE_COND);
	cond.dwChannel = channelNum;
	cond.struTimePoint.wYear = year;
	cond.struTimePoint.byMonth = month;
	cond.struTimePoint.byDay = day;
	cond.struTimePoint.byHour = hour;
	cond.struTimePoint.byMinute = minute;
	cond.struTimePoint.bySecond = second;

	int ret = NET_DVR_StartRemoteConfig(loginhandle, 6610, &cond, sizeof(cond), EasyDownloadPictureByTimeCallback, path);
	if (ret < 0)
	{
		return ret;
	}
	sleep(2);
	NET_DVR_StopRemoteConfig(ret);
	return ret;
}

int EASY_NET_DVR_DownFileByName_Start(int loginhandle, char* srcfile, char* destfile){
    int bRes = 1;
    int hPlayback = 0;
    if( (hPlayback = NET_DVR_GetFileByName(loginhandle, srcfile, destfile)) < 0 ){
        printf( "GetFileByName failed. error[%d]\n", NET_DVR_GetLastError());
        bRes= -1;
        return bRes;
    }
    int pos = 0;
    if(!NET_DVR_PlayBackControl_V40(hPlayback, NET_DVR_PLAYSETPOS, &pos,4,NULL,NULL)){
        printf("play back control failed [%d]\n",NET_DVR_GetLastError());
        bRes=-1;
        return bRes;
    }
    if(!NET_DVR_PlayBackControl_V40(hPlayback, NET_DVR_PLAYSTART, NULL,0,NULL,NULL)){
        printf("play back control failed [%d]\n",NET_DVR_GetLastError());
        bRes=-1;
        return bRes;
    }
   return 0;
}

int EASY_NET_DVR_DownFileByName_Stop(int filehandle){
	int bRes = 0;
    int nPos = NET_DVR_GetDownloadPos(filehandle);
    printf("have got %d\n", nPos);
    if(!NET_DVR_StopGetFile(filehandle)){
        printf("failed to stop get file [%d]\n",NET_DVR_GetLastError());
        bRes = -1;
        return bRes;
    }
    if(nPos<0||nPos>100) {
        printf("download err [%d]\n",NET_DVR_GetLastError());
        bRes=-1;
        return bRes;
    }else {
        return 0;
    }
 return 0;
}

Package again without error:

[Solved] ERROR: error loading sources list: The read operation timed out

During the installation of ROS platform under Ubuntu 20.04 system, an error is reported during the initialization of rosdep

rosdep update

Super times error

reading in sources list data from /etc/ros/rosdep/sources.list.d
ERROR: error loading sources list:
	The read operation timed out

When you execute rosdep update according to the method in this article, there is still a timeout error, and you think of adding it directly in sources. List. D https://ghproxy.com/ Prefix, as follows:

Connect the mobile phone hotspot and open the terminal for execution

sudo vim /etc/ros/rosdep/sources.list.d/20-default.list

Modify list content

# os-specific listings first
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx

# generic
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml fuerte

# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

Then run rosdep update to solve the problem.

[email protected]:~$ rosdep update
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://ghproxy.com/https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Add distro "foxy"
Add distro "galactic"
Skip end-of-life distro "groovy"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Skip end-of-life distro "jade"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Add distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/ubuntu/.ros/rosdep/sources.cache

[Solved] Fatal error: GLOG/logging. H: there is no such file or directory

System version: Ubuntu 18.04

ROS version: Melody

catkin_ Make error:

In file included from /home/Username/Desktop/AutonomousMining/src/pnc/src/file.cc:17:0:
/home/Username/Desktop/AutonomousMining/src/pnc/include/file.h:37:10: fatal error: glog/logging.h: Don't have that file or directory
 #include <glog/logging.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.
pnc/CMakeFiles/pnc.dir/build.make:134: recipe for target 'pnc/CMakeFiles/pnc.dir/src/file.cc.o' failed
make[2]: *** [pnc/CMakeFiles/pnc.dir/src/file.cc.o] Error 1
make[2]: *** Waiting for unfinished tasks....

Solution:

sudo apt-get install libgoogle-glog-dev

Done!

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

Error Message:

[[email protected]_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:

[[email protected]_0_17_centos]# cd /var/lib/rpm
[[email protected]_0_17_centos rpm]# ls
Basenames  Conflictname  __db.001  __db.002  __db.003  Dirnames  Group  Installtid  Name  Obsoletename  Packages  Providename  Requirename  Sha1header  Sigmd5  Triggername
[[email protected]_0_17_centos rpm]# rm -rf __db*
[[email protected]_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().