Tag Archives: linux

./ungrib.exe Start Error: Could not Fould libpng16.so.16 (/etc/ld.so.conf and ldconfig)

Project Scene:

After successfully building Linux, installing the required dependency libraries, and installing WPS and WRF. Run an instance simulation.


Problem description

./ungrib.exe reports an error that libpng16.so.16 cannot be found.
The error is as follows:
./ungrib.exe: error while loading shared libraries: libpng16.so. 16: cannot open shared object file: No such file or directory
1


Solution:

sudo vim /etc/ld.so.conf

Add statement: /home/tian/Software/libpng-intel/lib
2
3

sudo ldconfig

Go to ./ungrib.exe to run successfully

[Solved] yum Install gcc Error: Error: Package: glibc-headers-2.17-317.el7.x86_64

When installing Nignx
Installing the GCC compiler

yum install -y gcc

Report an error as below:

Error: Package: glibc-headers-2.17-317.el7.x86_64 (base)
           Requires: glibc = 2.17-317.el7
           Installed: glibc-2.17-322.el7_9.i686 (@c6-update)
               glibc = 2.17-322.el7_9
           Available: glibc-2.17-317.el7.i686 (base)
               glibc = 2.17-317.el7
Error: Package: glibc-devel-2.17-317.el7.x86_64 (base)
           Requires: glibc = 2.17-317.el7
           Installed: glibc-2.17-322.el7_9.i686 (@c6-update)
               glibc = 2.17-322.el7_9
           Available: glibc-2.17-317.el7.i686 (base)
               glibc = 2.17-317.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Show one installed version higher than the required version

Resolved by downgrading.

yum downgrade glibc glibc-devel glibc-common glibc-headers

Installation success!

Installed:
  gcc.x86_64 0:4.8.5-44.el7                                                                                                                                           

Dependency Installed:
  cpp.x86_64 0:4.8.5-44.el7 glibc-devel.x86_64 0:2.17-317.el7 glibc-headers.x86_64 0:2.17-317.el7 kernel-headers.x86_64 0:3.10.0-1160.el7 libmpc.x86_64 0:1.0.1-3.el7
  mpfr.x86_64 0:3.1.1-4.el7

Complete!

error: C compiler cannot create executables [How to Solve]

Phenomenon:

./configure --prefix=/usr/local/python3.6
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for python3.6... no
checking for python3... no
checking for python... python
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... linux
checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/Python-3.6.13':
configure: error: C compiler cannot create executables
See `config.log' for more details

Solution:

1. View log

# cat config.log |grep error
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
configure:4005: error: in `/tmp/Python-3.6.13':
configure:4007: error: C compiler cannot create executables

Missing libmpfr.so.4 File

2. Install mpfr

Package name:mpfr-3.1.1-4.el7.x86_64

~# yum install mpfr-3.1.1-4.el7.x86_64 -y
......
Verification:
~# ll /usr/lib64/libmpfr.so.4
libmpfr.so.4      libmpfr.so.4.1.1  
~# ll /usr/lib64/libmpfr.so.4
lrwxrwxrwx 1 root root 16 Sep  7 22:26 /usr/lib64/libmpfr.so.4 -> libmpfr.so.4.1.1

Finally, the problem is solved

[Solved] Ubuntu16.4Install vcs2016 Error: mount.vboxsf: mounting failed with the error: Invalid argument

Cause of the problem

VCS 2016 requires gcc4.8 and g++4.8, while VBoxGuestAdditions-6.1 – * * requires version 4.9+ to install (the ‘-fstack-protector-strong compilation option need to be supported).

Solution:

1. Check the version through
ls /usr/bin/gcc*. If not, install the corresponding version;

2. Then use the following command to perform version management
sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-5 100

3. Switch the new version of gcc with the following command
sudo update-alternatives –config gcc

4. Reinstall the VBoxGuestAdditions tool
cd /opt/VBoxGuestAdditions-6.1.36/init
sudo vboxadd setup

5. Finally, the problem was solved by re-hanging it in the directory

[Solved] KVM Failed to Startup Error: error: Network not found: no network with matching name ‘default‘

An error was reported when starting the KVM virtual machine on the command line: startup failed, and the default network could not be found

[root@localhost ~]# virsh start centos7.0
error: Failed to start domain centos7.0
error: Network not found: no network with matching name 'default'

However, there was a default network before, and an error was reported when it was restarted after a night. First, find the path of default.xml,

[root@localhost ~]# find/-name "default.xml"
/run/libvirt/storage/default.xml
/etc/libvirt/storage/default.xml
/etc/libvirt/storage/autostart/default.xml
/usr/share/backgrounds/default.xml
/usr/share/libvirt/networks/default.xml

It can be seen that there are many xml files. Select those related to network and libvirt for execution

[root@localhost ~]# virsh net-define /usr/share/libvirt/networks/default.xml
Network default defined from /usr/share/libvirt/networks/default.xml

[root@localhost ~]# virsh net-start default
Network default started

Start successfully, check:

[root@localhost ~]# virsh net-list
 Name                 State      Autostart     Persistent
----------------------------------------------------------
 default              active     no            yes

Finally, just start the KVM virtual machine:

[root@localhost ~]# virsh start centos7.0
Domain centos7.0 started

The graphical interface has also been viewed successfully:

[Solved] Redis New Version Install Error: server.c:3014:36: error: ‘struct redisServer’ has no member named ‘aof_filename’

The installation of a new version of Redis reports an error, as follows:

Current gcc version:

Upgrade gcc version:

yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash

Install again using make

[Solved] mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No s

After mongodb is installed, mongod reports the following error:

mongod: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Solution:

# Switch to the lib directory
cd ~/.conda/envs/my_gdal/lib # my_gdal:virtual environment
# Check if the file exists
ls -lh | grep "libcrypto.so.1.1"
-rwxrwxrwx 1 root root 3.2M Jun 4 15:43 libcrypto.so.1.1
# If the file exists execute
sudo ldconfig ~/.conda/envs/my_gdal/lib
# If the file does not exist
sudo find/-name 'libcrypto.so.1.1'
# Execute: sudo ldconfig path found
sudo ldconfig ~/.conda/pkgs/openssl-1.1.1q-h7f8727e_0/lib/

[Solved] FATAL ERROR:Network error: Software caused connection abort

SSH client to connect, stuck or pscp command report an error as follows in pscp.exe  XXXXXX    XXXXXXX  windows:

FATAL  ERROR:Network  error:Software  caused  connection  abort

 

How to Solve:

1. Please check the firewall policy of Linux host;

2. Add a line sshd: all at the end (or add by IP address and address segment) in /etc/hosts.allow file, and save it;

3. systemctl restart   sshd. service; Restart the ssh service;

[Solved] E Sub-process usrbindpkg returned an error code (1)

1. The problems are as follows:

An error was reported when installing the software

dlz@ubuntu:~$ sudo apt install wireshark-qt

2. Solution

The code is as follows (example):

root@ubuntu:~# sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old
root@ubuntu:~# sudo mkdir /var/lib/dpkg/info
root@ubuntu:~# sudo apt-get update
Hit:1 http://mirrors.ustc.edu.cn/ubuntu focal InRelease
Hit:2 http://mirrors.ustc.edu.cn/ubuntu focal-updates InRelease                
Hit:3 http://mirrors.ustc.edu.cn/ubuntu focal-backports InRelease              
Hit:4 http://mirrors.ustc.edu.cn/ubuntu focal-security InRelease               
Hit:5 http://ppa.launchpad.net/linrunner/tlp/ubuntu focal InRelease            
Reading package lists... Done
root@ubuntu:~# sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 518 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up wireshark-common (3.2.3-1) ...
Setting up wireshark-qt (3.2.3-1) ...
Setting up wireshark (3.2.3-1) ...
root@ubuntu:~# sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old
root@ubuntu:~# sudo rm -rf /var/lib/dpkg/info
root@ubuntu:~# sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info
root@ubuntu:~#