Category Archives: Linux

[Solved] Nrm Error: internal validators.js 124 throw new ERR_INVALID_ARG_TYPE(name, ‘string’, value);

1. Windows finds the directory where nrm is located

C:\Users\username\AppData\Roaming\npm\node_modules\nrm

The cli.js file under the installation path of nrm

2. Open the cli.js file

const NRMRC = path.join(process.env.HOME,'.nrmrc' );
 // 
Change to const NRMRC = path.join(process.env[(process.platform =='win32')?'USERPROFILE': ' HOME'],'.nrmrc');

3. Save it.

nrm ls successfully executed

Linux Run Yum Clean All Stuck or error [How to Solve]

Execute the following commands in sequence:
rm -rf /var/lib/rpm/ __db .00* # If you are afraid of deletion, you can back up 
rpm -vv - rebuilddb
yum clean all
yum makecache #When yum is installed, the installation package will be cached, but it is better to execute the yum makecachecommand again and the execution may report an error, it does not matter

That’s all. hope this solution will help you.

[Solved] Linux: ‘readonly’ option is set add-command line save error

In order to facilitate the command line save error when configuring a static IP for the Linux virtual machine:’readonly’ option is set add (add! To override), but try to enter: wq! Still unable to save the updated configuration.

Reason for error: The user does not have permission to write to the file

Solution: switch to root user

 

Enter the command: sudo -i

Enter the password of the current management account to get root privileges, and enter exit when not needed to return to the low-privilege management account

[Solved] CentOS7 failed to install psutil: module command’gcc’ failed with exit status 1

CentOS install psutil package:
python version: 3.6
wget https://pypi.python.org/packages/source/p/psutil/psutil-3.2.1.tar.gz –no-check-certificate
tar zxvf psutil-3.2.1.tar.gz
cd psutil-3.2.1
python setup.py install
An error is reported when executing python setup.py install:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_VERSION=321 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python2.7 -c psutil/_psutil_linux.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_linux.o
unable to execute gcc: Not a directory
error: command ‘gcc’ failed with exit status 1
1. Lack of gcc dependent environment Install gcc
yum -y install gcc
2. The python-devel package is missing
yum install python-devel -y
Summary: During the installation process, there may still be other environment dependent packages. The idea to solve —- what is missing to make up.

How to Solve Failed to start connector [Connector[HTTP/1.1-8080]]

Error prompt: Failed to start connector [Connector[HTTP/1.1-8080]]
Reason for the error: Tomcat port is occupied
Solution (under window):
1. cmd to open the command console

2. View the port used by tomcat netstat -ano |findstr 8080

 

 

Here “3920” is the process number

occupying the port 3. Kill the process occupying the port taskkill /pid 3920 /f

 

 

Note: If the process cannot be killed

 

 

Possibly insufficient permissions:
in the “command prompt”

 

 

Right click and select “Run as administrator”
and execute taskkill /pid 3920 /f

The “git” item cannot be recognized as the name of a cmdlet, function, script file, or executable program. Please check the spelling of the name, if you include the path, make sure the path is correct

Errors encountered when running git related commands in the terminal or node.js:

 

Solution:

1. Find the path of bin in the git installation on your computer, such as: C:\Users\XXX\Git\Git\bin; at the same time, find the location of git-core in the git installation path, such as: C:\Users\XXX \Git\Git\libexec\git-core;

XXX is the system name;

2. Configure system variables. Right-click “Computer” -> “Properties” -> “Advanced System Settings” -> “Environment Variables” -> Find “path” in the “System Variables” below -> select “path” and select “Edit” -> Copy the bin and git-core paths found in 1 to the left. Save and exit.

Then re-run git, success!

 

[Solved] Ubuntu16.04 Start up Error: tpm_tis: A TPM error

“tpm_tis: A TPM error (6) occurred attempting to read a pcr value”.
Information about TPMhttps://wiki.archlinux.org/index.php/TPM
If you not need TPM, just
echo blacklist tpm_tis > /etc/modprobe.d/tpm_tis.conf (need root)
It worked on my computer. The error gone.

$sudo vim /etc/modprobe.d/tpm_tis.conf

Enter the following: blacklist tpm_tis

Additional options:

just activate the security chip in the bios, that should work, too. similar to whatRikTwrote, on my thinkpad the error message was gone after i enabled the security chip in the bios, changing it frominactivetoactive. so it seems you can get rid of the error message by either activating or disabling the security chip.

Vsftp: 425 FTP connection failed [How to Solve]

Find the ftp configuration file /etc/vsftpd/vsftpd.conf

vsftp:425 failed to establish connection

Modify the configuration file by appending

 pasv_enable=YES
 pasv_min_port=65000
 pasv_max_port=65500

The port number can be customized

and restart the FTP service

 # systemctl restart vsftpd.service

open PASV_ min_ Port and PASV_ max_ Port range port, take firewall as an example

 # firewall-cmd --zone=public --add-port=65000-65500/tcp --permanent
 # firewall-cmd --reload

For more operations of firewall, please move to the basic operations of CentOS firewall

425 Security: Bad IP connecting

modify configuration file and add

 pasv_promiscuous=YES

Restart FTP service

 # systemctl restart vsftpd.service

421 service not available, remote server has closed connection

System version:Linux centos7_server 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
[root@centos7_server ~]# ftp 1.1.1.1
Connected to 1.1.1.1(1.1.1.1).
220 (vsFTPd 3.0.2)
Name (1.1.1.1:root): MyD
331 Please specify the password.
Password:
500 OOPS: vsftpd: refusing to run with writable root inside chroot()
Login failed.
421 Service not available, remote server has closed connection
ftp>
[root@centos7_server ~]# vim /etc/vsftpd/vsftpd.conf
Add write access to the account by writing allow_writeable_chroot=YES in the configuration file.
Then restart the vsftpd service, and if that doesn’t work once, then twice.
[root@centos7_server ~]# ftp 1.1.1.1
Connected to 1.1.1.1(1.1.1.1).
220 (vsFTPd 3.0.2)
Name (1.1.1.1:root): MyD
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

Special note, the above action is only to close Iptables and Firewalld, SELinux is on, there is an action to SELinux.
systemctl stop iptables colse iptables
systemctl stop fireawlld colsefirewalld
[root@centos7_server ~]# getsebool -a | grep ftpd
ftpd_anon_write –> off
ftpd_connect_all_unreserved –> off
ftpd_connect_db –> off
ftpd_full_access –> off  ftpd_full_access set as ftpd_full_access on
ftpd_use_cifs –> off
ftpd_use_fusefs –> off
ftpd_use_nfs –> off
ftpd_use_passive_mode –> off
[root@centos7_server ~]# setsebool -P ftpd_full_access on This command has the following meaning: Enable the permission policy for the ftp service in the SELinux domain
[root@centos7_server ~]# getsebool -a | grep ftpd
ftpd_anon_write –> off
ftpd_connect_all_unreserved –> off
ftpd_connect_db –> offftpd_full_access –> on
ftpd_use_cifs –> off
ftpd_use_fusefs –> off
ftpd_use_nfs –> off
ftpd_use_passive_mode –> off
[root@centos7_server ~]#