Tag Archives: linux

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

Running LIO-SAM reported the following error:

lio_sam/lio_sam_imuPreintegration: error while loading shared libraries: libmetis.so: cannot open shared object file: No such file or directory

 

Solution:

Use the following code to install:

sudo apt-get install libparmetis-dev

Problem solved successfully

error: ‘integer_sequence’ is not a member of ‘std’ [How to Solve]

I encountered this error when compiling the camodacal project:

/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
 struct SumImpl<std::integer_sequence<T, N, Ns...>> {
                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:46: error: wrong number of template arguments (3, should be 1)
 struct SumImpl<std::integer_sequence<T, N, Ns...>> {
                                              ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
 struct SumImpl;
        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:64:49: error: expected unqualified-id before ‘>’ token
 struct SumImpl<std::integer_sequence<T, N, Ns...>> {
                                                 ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
 struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:21: error: ‘integer_sequence’ is not a member of ‘std’
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:51: error: wrong number of template arguments (4, should be 1)
 struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
                                                   ^~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:60:8: note: provided for ‘template<class Seq> struct ceres::internal::SumImpl’
 struct SumImpl;
        ^~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:71:54: error: expected unqualified-id before ‘>’ token
 struct SumImpl<std::integer_sequence<T, N1, N2, Ns...>> {
                                                      ^~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’
 struct SumImpl<std::integer_sequence<T, N1, N2, N3, N4, Ns...>> {
                     ^~~~~~~~~~~~~~~~
/usr/local/include/ceres/internal/integer_sequence_algorithm.h:78:21: error: ‘integer_sequence’ is not a member of ‘std’

In the final analysis, it is the version of Ceres. There are many online solutions that may work for other projects:

Modify the cmakelists file:

set(CMAKE_CXX_FLAGS "-std=c++11")

Is:

set(CMAKE_CXX_STANDARD 11)

Or:

set(CMAKE_CXX_STANDARD 14)

Details can be found in the ceres source code description at:
https://github.com/ceres-solver/ceres-solver/issues/604
But if it still doesn’t work, for example if I compile an old project like CamOdoCal, I can return the ceres version to 1.1.4

How to Solve Java Runtime (class file version 53.0)ERROR

libs/granite/ui/components/shell/header/user/User has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Specific corresponding version:

JDK 1.1 = 45
JDK 1.2 = 46
JDK 1.3 = 47
JDK 1.4 = 48
Java SE 5.0 = 49
Java SE 6.0 = 50
Java SE 7 = 51
Java SE 8 = 52
Java SE 9 = 53
Java 10 = 54
Java 11 = 55
Java 12 = 56
…

 

So the question is, how to replace the version?
First of all, the easiest way is to check whether java has been installed through the command: java -version
View the java package of yum source: yum list java*
Install java108jdk software: yum -y install java-1.8.0-openjdk****
Verify that the installation is successful, check the java version: java -version

[Solved] xtrabackup Error: “Too many open files” (system error number 24)

The following error occurs during a MySQL database backup:

InnoDB: Operating system error number 24 in a file operation.
InnoDB: Error number 24 means ‘Too many open files’ 
InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html 

It is found that there are too many data files:

a total of 90811 data files.

View number of open files:

[root@localhost ~]# ulimit -Sn
1024
[root@localhost ~]# ulimit -Hn
4096

Description of this check command:

ulimit [-HSTabcdefilmnpqrstuvx [limit]]
              Provides  control over the resources available to the shell and to processes started by it, on systems that allow such control.  The -H and -S options specify that the hard or soft
              limit is set for the given resource.  A hard limit cannot be increased by a non-root user once it is set; a soft limit may be increased up to the value of the hard limit. 
  -n     The maximum number of open file descriptors (most systems do not allow this value to be set)

Query the maximum number of files opened by the operating system:

# cat /proc/sys/fs/nr_open
1048576

In the file/etc/security/limits Conf settings:

mysql hard nofile 65535
mysql soft nofile 65535

mysql hard nproc 65535
mysql soft nproc 65535

You can also replace MySQL with *
the problem of re backup is solved.

[Solved] Fatal error C1001 internal error occurred in the compiler openmesh6 three

Internal Compiler Error VS 2015 Update1
VS2015 Update1 An error occurred when compiling the OpenMesh code:

fatal error c1001 An internal error occurred in the compiler OpenMesh6.3
(compiler file ‘f:\dd\vctools\compiler\cxxfe\sl\p1\c\special.c’, line 6211)
1> To work around this problem, try simplifying or changing the program near the locations listed above.

The reason is that codes such as this appear

OpenMesh::Vec3f normal[4];

Solution: change this kind of code to the following.

OpenMesh::Vec3f normal[4] = { {},{},{},{} };

[Solved] Centos8 openssh Compile Error: error while loading shared libraries


When running the program under CentOS 8, I found the error while loading shared libraries. I didn’t know the solution for a while. Now I have explored and solved it, as follows:

1. Find the path where the missing library is located {find/- name} XXX

2. Put the path in /etc/ld.so.conf

3. At the command line, enter ldconfig

4. No error will be reported after compiling again

[Solved] Error running ‘myToncat‘: Address localhost:8080 is already in use

Error running ‘mytoncat’: address localhost: 8080 is already in use
solve the problem that port 8080 is occupied when starting Tomcat:
run the local command line terminal CMD as an administrator, and enter
netstat - ano | findstr 8080// find the process number occupying the 8080 port number
and then enter:
taskkill/PID 6148 - F// where 6148 is the process number occupied by your local machine

[Solved] Fatal error LNK1169: one or more multiple defined symbols were found

Declare the global variable. The global function must be declared in CPP. If other classes refer to the global variable, include the H file of the CPP, and then extern. Otherwise, the repeated definition error is likely to occur.

How does this “easy” explain?

For example, if a global variable is declared in A.H

int Global;

In B.H

include "A.h"
.....
extern int Global;
......

If you include A.H, it is equivalent to including the declaration of global variables in A.H, and the compiler will consider it a duplicate definition.

Therefore, global variables and function declarations must be in CPP when The vs compiler reports this error when there is a function implementation in the H file.

Solution:
1 Yes Add inline
2 before the function declaration in H In project – > Attribute – > Linker – > Command line – > Add/force to additional options

The above is loaded from David_H

I also encountered this error, but the whole project contains too many files to analyze the inclusion relationship, but the problem should be similar.

my solution is:

Project – > Properties – > Linker – > Command line – > Add /force 

to additional options

It solved the error, but there were a lot of warnings.

[Solved] Error: ENOSPC: System limit for number of file watchers reached

Project environment

Vue project

Cause of problem

The number of file monitoring is too large and the system limits it

Modify {etc/sysctl.d

 fs.inotify.max_user_watches = 524288

Apply changes

sudo sysctl -p --system

Docker inherits some setting files on the host. In order to prevent global impact, the above files will be set to read only in docker. Therefore, you need to change the above configuration on the host. After the host changes, docker automatically inherits.

Win10 remote connection submits error by using cluster: Batch: error: batch script contains DOS line breaks (\R\n) sbatch: error

Description:

The notebook of win10 system is remotely connected to the win10 workstation of the office, and then the win10 workstation is used to submit tasks to the cluster server. At this time, you can edit bash directly in the Linux environment of the cluster server The SH file cannot be run normally. If you use VIM to open the file and edit it again, the error will be prompted as follows:

batch: error: Batch script contains DOS line breaks (\r\n)
sbatch: error: instead of expected UNIX line breaks (\n)

In this case, use vscode to bash The SH file can be changed from CRLF to LF to solve the problem.