Category Archives: Linux

[Solved] Ubuntu 20.04 install MATLAB and toolbox permissions Error

1. Prompt for no access during installation
open the install file with sudo command, and remember to CD to the install directory

 sudo ./install

if the program is stuck and cannot be opened after entering the password, open the terminal and enter the following command

xhost +SI:localuser:root

2. Prompt for no access when installing the toolbox using the built-in add on
use Chmod to adjust file access rights

sudo chmod -R o+rw /usr/local/MATLAB/RXXXXx

after adjusting the permissions, you can download it, but an unexpected error appears at the end, which makes it impossible to install it
download the MATLAB installer again and reinstall it. Note that you don’t need to reinstall it all. Just select the toolbox you want

[Solved] Ubuntu 18.04 Install opencv3.2.0 and opencv_contrib Error

After configuring the ROS melody environment for Jetson nano B01 and planning to install the turtle BOT, you need to install opencv3.2.0 and add GPU acceleration support to the compilation of OpenCV. There is a problem when installing opencv from the source code:

CMake Error at cmake/OpenCVModule.cmake:286 (add_subdirectory):
  The binary directory

    /home/fdse/tools/opencv-3.2.0/release/modules/cudaarithm/.cudaarithm

  is already used to build a source directory.  It cannot be used to build
  source directory

    /home/fdse/tools/opencv_contrib/modules/cudaarithm

  Specify a unique binary directory name.
Call Stack (most recent call first):
  modules/CMakeLists.txt:7 (ocv_glob_modules)


CMake Error at cmake/OpenCVModule.cmake:286 (add_subdirectory):
  The binary directory

    /home/fdse/tools/opencv-3.2.0/release/modules/cudabgsegm/.cudabgsegm

  is already used to build a source directory.  It cannot be used to build
  source directory

    /home/fdse/tools/opencv_contrib/modules/cudabgsegm

  Specify a unique binary directory name.
Call Stack (most recent call first):
  modules/CMakeLists.txt:7 (ocv_glob_modules)


CMake Error at cmake/OpenCVModule.cmake:286 (add_subdirectory):
  The binary directory

    /home/fdse/tools/opencv-3.2.0/release/modules/cudacodec/.cudacodec

  is already used to build a source directory.  It cannot be used to build
  source directory

    /home/fdse/tools/opencv_contrib/modules/cudacodec

  Specify a unique binary directory name.
Call Stack (most recent call first):
  modules/CMakeLists.txt:7 (ocv_glob_modules)


CMake Error at cmake/OpenCVModule.cmake:286 (add_subdirectory):
  The binary directory

    /home/fdse/tools/opencv-3.2.0/release/modules/cudafeatures2d/.cudafeatures2d

  is already used to build a source directory.  It cannot be used to build
  source directory

    /home/fdse/tools/opencv_contrib/modules/cudafeatures2d

  Specify a unique binary directory name.
Call Stack (most recent call first):
  modules/CMakeLists.txt:7 (ocv_glob_modules)

The reason is that the version of opencv_conteib is inconsistent with that of opencv. When cloning opencv, add -b 3.2.0. Similarly, when cloning opencv_contrib, clone version 3.2.0 and add -b 3.2.0, then no error will be reported.

How to Solve insufficent privileges error: Ora-01031

For Oracle database in remote multi instance linux environment, an error is reported when executing conn/as SYSDBA: ora-01031: insufficient privileges. The solution process is as follows:

Step 1: find the sqlnet.ora file. Add the following two

SQLNET.AUTHENTICATION_SERVICES=(ALL)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT, HOSTNAME)

Step 2: after saving, exit and execute lsnrctl reload

Step 3: the following errors occur after I finish executing:

TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   Linux Error: 1: Operation not permitted```


To solve this problem, execute: Chmod 777/var/TMP/.Oracle

Step 4: specify the connection instance. The orcl here should fill in your own instance name.

export ORACLE_SID=orcl

Step 5: when reconnecting, an error is reported connected to an idle instance.
. Note that this only means that the instance is not started, which is not a big problem. First query the status select status from V $instance

Step 6: start

startup

Since then.

docker-compose -version Run Error [How to Fix]

Question:

Start downloading

curl -L ” https://github.com/docker/compose/releases/download/1.25.0/docker-compose- $(uname -s)-$(uname -m)” -o /usr/local/bin/docker-compose

function

docker-compose –version

report errors

Cannot open self /usr/local/bin/docker-compose or archive /usr/local/bin/docker-compose.pkg

reason:

Find out that the downloaded files are missing due to the network

Solution:

Download the source file from GitHub on the local machine, and then upload it to the Linux server

[Solved] curl: symbol lookup error: curl: undefined symbol: curl_mime_free

curl: symbol lookup error: curl: undefined symbol: curl_mime_free
Execute curl command to report error

curl -s https://www.adas.com

report errors:

curl: symbol lookup error: curl: undefined symbol: curl_mime_free

Solution:

#ubuntu system
apt-get update -y

#centos
yum update -y

Execute curl – s again, normal

[Solved] error:getaddrinfo ENOTFOUND xxx.xxxx.com xxx.xxxx.com:443

The nodejs request interface on the container docker server reports error: getaddrinfo ENOTFOUND xxx.xxxx.com xxx.xxxx.com:443.

Reason:

The current server cannot be connected to the request you want to request.

Solution:

1. Ping xxx.xxxx.com on the current server to see if it can be pinged (If the ping fails, it is a proxy problem, add xxxx xxx.xxxx.com in the hosts file.)
2. If it can be pinged, use the curl command to request the path to see if it can be called
3. If you are using the ip path interface, the call may be unsuccessful or the default port is not opened (80 is the default port of http, 443 is https)
4. If it can be pinged and the interface can be successfully called by using the curl command on the server, but it cannot be called in the project, it may be that the hosts file has been modified but did not take effect. Solution for this situation: add hosts in the container or inherit the hosts when starting the container (inherit hosts: when starting the docker container, add a sentence $(cat /etc/hosts|awk -F ”'{if(NR>2 ){print “–add-host “$2”:”$1}}’), you can integrate the host’s hosts file)

docker run --restart=always $(cat /etc/hosts|awk -F ' ' '{if(NR>2){print "--add-host "$2":"$1}}') -d -p 主机端口:容器端口 --name 指定容器名字 仓库/容器

[Solved] Node uploads files to FTP server error: timed out while making data connection

Wrong reason
An FTP server was built in the local area network. Because the project uses an FTP file upload and download service packaged by node-ftp, the following error is reported when uploading files:

(node:29020) UnhandledPromiseRejectionWarning: Error: Timed out while making data connection
at Timeout. (D:\git project\nexrender\packages\nexrender-provider-ftp\node_modules\ftp\lib\connection.js:901:12)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7)
(Use node --trace-warnings ... to show where the warning was created)
(node:29020) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:29020) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Problem analysis

Open port 21 on the server and use cmd locally to connect to the ftp service. It is possible to connect normally and upload and download files.

Solution
Turn off the firewall, the server is CentOS7, the steps to turn off are as follows

#View the ports opened by the firewall
firewall-cmd --list-ports
#8008/tcp 21/tcp 80/tcp
#View the status of the firewall
firewall-cmd --state
#running
#Turn off the firewall
systemctl stop firewalld
#View firewall status
firewall-cmd --state
#not running

[Solved] Beeline Error: Error: Could not open client transport with JDBC Failed to Connection

 

Error: Could not open client transport with JDBC Uri: jdbc:hive2://node01:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)

Error: unable to open client transport with JDBC URI: JDBC: hive2:// node01:10000: java.net.connectexception: connection rejected (connection rejected) (state = 08s01, code = 0)

Solution

When connecting to beeline through the command, it is found that the client connection fails

[ root@node03 ~]# beeline -u jdbc:hive2://node01:10000 -n root

Check port 10000 and find that it is not started

[ root@node01 ~]# netstat -anp|grep 10000

It takes time for hiveserver2 to start. You need to wait for a while. It will not start until hiveserver2 displays four hive session IDs (I just started four successfully).

Then I realized that no wonder the teacher mentioned that he had to wait a while to connect beeline.

This is a successful start, so don’t worry and deal with it calmly when you report an error.