Category Archives: Linux

Pytorch Install Error: OSError: [WinError 126] Could not Find the Module, Error loading “xx\lib\site-packages\torch\lib\asmjit.dl

conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

The installation can be completed normally, but an error occurred in the import torch vision:

C:\Users\xuyic\anaconda3\envs\pytorch\lib\site-packages\torchvision\io\image.py:11: UserWarning: Failed to load image Python extension: [WinError 126] 找不到指定的模块。
  warn(f"Failed to load image Python extension: {e}")

Solution:

1. From cuda10.2 to 11.3

2. Reduce the version of torchvision, such as 1.3.0

VBox install Ubuntu 16.04 shared folder suddenly fails Error: error: unrecognized command line option ‘- fstack protector strong’

Cause investigation

#gcc -v

Found version 4.7.7

but

Installing the above enhanced software requires the gcc5.0 provided with 16.04 Version 4

Solution:

1  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 100
2  sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 50
3  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 100
4  sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 50
Then Re-install
#./autorun.sh
Done!

[Solved] Err:12 http://security.ubuntu.com/ubuntu focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.11+9-0ubuntu2~20.04 404 Not Found [IP: 91.189.88.152 80]

Err:12 http://security.ubuntu.com/ubuntu Focal-updates/main amd64 openjdk-11-jre-headless amd64 11.0.11+9-0ubuntu2~20.04
404 Not Found [IP: 91.189.88.152 80]

apt install openjdk-11-jre-headless  ## The following error is reported when installing the java environment

2. Solution

apt update

3. Testing

apt install openjdk-11-jre-headless -y
root@DESKTOP-1N42TVH:/home/software/frontend# java --version
openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.20.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.20.04, mixed mode, sharing)

CentOS Error: Failed to set locale, defaulting to C

-bash: local: can only be used in a function
[root@VM-24-5-centos ~]# locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE=UTF-8
LC_NUMERIC=”en_US.UTF-8″
LC_TIME=”en_US.UTF-8″
LC_COLLATE=”en_US.UTF-8″
LC_MONETARY=”en_US.UTF-8″
LC_MESSAGES=”en_US.UTF-8″
LC_PAPER=”en_US.UTF-8″
LC_NAME=”en_US.UTF-8″
LC_ADDRESS=”en_US.UTF-8″
LC_TELEPHONE=”en_US.UTF-8″
LC_MEASUREMENT=”en_US.UTF-8″
LC_IDENTIFICATION=”en_US.UTF-8″
LC_ALL=
[root@VM-24-5-centos ~]# echo “export LC_ALL=en_US.UTF-8” >> /etc/profile
[root@VM-24-5-centos ~]# source /etc/profile
[root@VM-24-5-centos ~]#

[Solved] gitee Push Error: error: failed to push some refs to

Today, I created a project in gitee to push the local code. I found an error. The error is as follows:

error: failed to push some refs to 'https://gitee.com/xxxx'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

Analysis reason:

Because readme The MD file is not in the local code directory

Solution:

Execute the following command to set readme MD pull to local

git pull --rebase origin master

Then execute the following command to push the file

git push origin master

[Solved] ubuntu 18.04 Fix Error: “libpng12.so.0: cannot open shared object file: No such file or directory”

Error “libpng12.so.0: cannot open shared object file: No such file or directory”
When running ORB_SLAM3, I encountered the error “libpng12.so.0: cannot open shared object file: No such file or directory”. Execute the command “sudo apt install libpng12-0” to install libpng12.so.0 and solve the problem.
The command log of the error:

/proj/hankf/slam/ORB_SLAM3$ ./Examples/Stereo/stereo_euroc ./Vocabulary/ORBvoc.txt ./Examples/Stereo/EuRoC.yaml /proj/hankf/hankf/slam/euroc-mav-dataset/MH_04_difficult ./Examples/Stereo/EuRoC_TimeStamps/MH04.txt dataset-MH04_stereo
./Examples/Stereo/stereo_euroc: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory

Installed command record

hankf@XSZGS4:/proj/hankf/hankf/slam/opencv-4.5$ sudo apt install libpng12-0
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  libpng12-0
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/116 kB of archives.
After this operation, 285 kB of additional disk space will be used.
Selecting previously unselected package libpng12-0:amd64.
(Reading database ... 315713 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...
Setting up libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...