Category Archives: Linux

Svn service startup error 0x8007042a [How to Solve]

Server environment: Windows Server 2008 R2 Enterprise Edition, visual svnserver 2.6.5

The code cannot be checked out. It is found that the SVN service is shut down and an error is reported when it is started manually:

Event Viewer:

Error: no listening sockets available, shutting down
Error: Unable to open logs

Cause: the port is occupied

Solution:

Visual svnserver – menu – operation – properties – Network view port is 433

Netstat – ano check the port status. Port 443 is occupied by the pid4 process. This is the system process. Check IIS and find that a website occupies port 433

Modify the port to resolve the conflict

 

Ifconfig command not found for Linux Installation Errors [How to Solve]

Problem Description:

Install Linux system with virtual machine VMware (the image file is centos-7.0-1406-x86 downloaded from the official website_64-DVD.iso),

After the installation is completed, enter the ifconfig command and an error is reported: ifconfig command not found

Solution:

1 determine whether ifconfig is not installed. If not, add it

2 determine whether it is not added to the environment variable. If not, add it

Solution:

First determine if ifconfig is missing, it is in the /sbin directory




[root@localhost ~]# cd /sbin
[root@localhost sbin]# ls

Check to see if ifconfig is present


If you don't have ifconfig, install net-tools package


[root@localhost sbin]# sudo yum install net-tools

Of course, if ifconfig already exists in the specified directory, it may also be caused by other problems, such as the environment variable is not added:

 

The original use ifconfig can be used, today is how, may be the installation software modified, Baidu ~ ~

[oracle@localhost /]$ ifconfig 
prompt: "bash: ifconfig: command not found" 
So I switched to the root user 
[root@localhost /]$ ifconfig 
It still says: "bash: ifconfig: command not found" 
Analyze the problem 
1. whereis ifconfig to see which directory the command is in 
2. echo $PATH to see if the directory is under the scrip, note that lunux is completely case-sensitive, so do not ignore this point 
3. Execute the command, you need to specify the path or add the directory to the PATH 
4. Then you can access it like this 
Method 1: [root@localhost sbin]$ /sbin/ifconfig can appear to use 
Method 2: [root@localhost sbin]$ export PATH=$PATH:/sbin , after setting this, you can access it directly next time, avoiding the trouble of the first one, such as: [root@localhost sbin]$ export PATH=$PATH:/sbin 
[root@localhost /]$ ifconfig 
Method 3: Modify the /etc/profile file, comment out the if statement 
Comment out the following if statement. 
# Path manipulation 
if [ "$EUID" = "0" ]; then 
pathmunge /sbin 
pathmunge /usr/sbin 
pathmunge /usr/local/sbin 
fi 
Modify to 
# Path manipulation 
# if [ "$EUID" = "0" ]; then 
pathmunge /sbin 
pathmunge /usr/sbin 
pathmunge /usr/local/sbin 
#fi 
Note: It is not only the ifconfig command that gives "bash: ifconfig: command not found", because the non-root user does not have /sbin/ifconfig in his path.

If the command "bash: ifconfig: command not found" is not only for ifconfig command, but also for other commands, the solution is the same. 

Linux Install Error: pkg-config not found [How to Solve]

Linux Installation Error: PKG config not found


When using compile to install, the following error occurs when executing./configure:

...
...
checking for pkg-config... no
pkg-config not found
configure: error: Please reinstall the pkg-config distribution

Prompt: configuration error, please reinstall PKG configuration distribution

Solution: according to the prompt, install PKG config:

sudo apt-get install pkg-config

Expand knowledge:

About PKG config:

pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use gcc -o test test.c `pkg-config –libs –cflags glib-2.0` for instance, rather than hard-coding values on where to find glib (or other libraries). It is language-agnostic, so it can be used for defining the location of documentation tools, for instance.

SSH login error: no common Kex alg [How to Solve]

ssh login to solaris10 with error.

Jan 19 11:02:51 node1 sshd[7489]: fatal: no common kex alg: client ‘diffie-hellman-group1-sha1’, server ‘gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g==’

This problem is caused by the ssh key, you need to regenerate the rsa and dsa key.

root@node1 :/etc/ssh #> ls -ltr
total 194
-rwxr–r–   1 root     sys          861 Jan 22  2005 ssh_config
-rwxr–r–   1 root     sys        88301 Jan 22  2005 moduli
-rwxr–r–   1 root     root         887 Nov  7  2010 ssh_host_rsa_key
-rwxr–r–   1 root     root         227 Nov  7  2010 ssh_host_rsa_key.pub
-rwxr–r–   1 root     root         668 Nov  7  2010 ssh_host_dsa_key
-rwxr–r–   1 root     root         607 Nov  7  2010 ssh_host_dsa_key.pub
-rwxr–r–   1 root     sys         5026 Nov  7  2010 sshd_config

Delete the original key
root@node1 :/etc/ssh #> rm -rf ssh_host_*

Generate a new key
root@node1 :/etc/ssh #> /lib/svc/method/sshd -c
Creating new rsa public/private host key pair
Creating new dsa public/private host key pair

Restart ssh service
root@node1 :/etc/ssh #> svcadm restart ssh

 

Tomcat running under Linux reports an error broken pipe

linux tomcat run error Broken pipe

It is possible that linux’s threading mechanism can generate JVM errors, especially during connection peaks often appear such problems, tomcat in linux also appear similar situations.
The solution is to set: _JAVA_SR_SIGNUM = 12 in the environment variable and you can basically solve it.In WIN environment variable set: _JAVA_SR_SIGNUM=12, if Linux with export _JAVA_SR_SIGNUM=12, basically you can solve.
sun’s explanation.
--posted by: cooper
Below is a clipping from Sun on working around JVM crashes under high
thread counts in the JVM 1.3 for Linux
On Linux, use a larger signal number for hotspot thread
suspension/resumption handler. The signal number being used is
specified by environment variable _JAVA_SR_SIGNUM. Setting it to a
number larger than SIGSEGV (11) will solve the PRoblem. A good number
to use is 12, which is SIGUSR2. Using signal 16 to work around the
problem might have potential problems. So on tcsh, “setenv
_JAVA_SR_SIGNUM 12” can solve the problem.

 

Error reporting in Ubuntu apt get upgrade [How to Solve]

When upgrading the source in Ubuntu 16.04, an error is reported:

ubuntu@SIFT-SYS-7048GR-TR:~$ sudo apt-get upgrade
[sudo] password for ubuntu:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue?[Y/n]
Setting up python-gi (3.20.0-0ubuntu1) ...
/var/lib/dpkg/info/python-gi.postinst: 6: /var/lib/dpkg/info/python-gi.postinst: pycompile: not found
dpkg: error processing package python-gi (--configure):
subprocess installed post-installation script returned error exit status 127
dpkg: dependency problems prevent configuration of alacarte:
alacarte depends on python-gi (>= 3.0); however:
Package python-gi is not configured yet.

dpkg: error processing package alacarte (--configure):
dependency problems - leaving unconfigured
Setting up python-opencv (2.4.9.1+dfsg-1.5ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
/var/lib/dpkg/info/python-opencv.postinst: 6: /var/lib/dpkg/info/python-opencv.postinst: pycompile: not found
dpkg: error processing package python-opencv (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
python-gi
alacarte
python-opencv
E: Sub-process /usr/bin/dpkg returned an error code (1)
ubuntu@SIFT-SYS-7048GR-TR:~$ sudo dpkg -C
The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure
menu option in dselect for them to work:
alacarte easy GNOME menu editing tool

The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
python-gi Python 2.x bindings for gobject-introspection libraries
python-opencv Python bindings for the computer vision library

ubuntu@SIFT-SYS-7048GR-TR:~$ sudo dpkg --configure python-gi
Setting up python-gi (3.20.0-0ubuntu1) ...
/var/lib/dpkg/info/python-gi.postinst: 6: /var/lib/dpkg/info/python-gi.postinst: pycompile: not found
dpkg: error processing package python-gi (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
python-gi
ubuntu@SIFT-SYS-7048GR-TR:~$ sudo apt-get install --reinstall apport
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
Need to get 120 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apport all 2.20.1-0ubuntu2.10 [120 kB]
Fetched 120 kB in 0s (684 kB/s)
(Reading database ... 290222 files and directories currently installed.)
Preparing to unpack .../apport_2.20.1-0ubuntu2.10_all.deb ...
/var/lib/dpkg/info/apport.prerm: 19: /var/lib/dpkg/info/apport.prerm: pyclean: not found
dpkg: warning: subprocess old pre-removal script returned error exit status 127
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 19: /var/lib/dpkg/tmp.ci/prerm: pyclean: not found
dpkg: error processing archive /var/cache/apt/archives/apport_2.20.1-0ubuntu2.10_all.deb (--unpack):
subprocess new pre-removal script returned error exit status 127
/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
/var/cache/apt/archives/apport_2.20.1-0ubuntu2.10_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

where it repeatedly appears

/var/lib/dpkg/info/apport.postinst: 13: /var/lib/dpkg/info/apport.postinst: pycompile: not found

Solution:

So, it’s probably a problem with python and apport

Then, Google related information, the result is that apport and python need to be reinstalled, related links: package-management and dpkg returned an error code, related names are as follows:

reinstall python:

sudo apt-get -m –reinstall install python python-minimal dh-python

sudo apt-get -f install

reinstall apport:

sudo apt-get update

sudo apt-get install –reinstall apport

sudo apt-get -f install

sudo apt-get dist-upgrade

Outcome:

ubuntu@SIFT-SYS-7048GR-TR:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

 

Linux Error: missing argument to `-exec’ [How to Solve]

When using the find command under linux, an error is reported: find: missing argument to `-exec’

The specific execution command is:

Shell code Collection code
find /u03 -name server.xml -exec grep ‘9080’ {}\;
The purpose is to find the file named server.xml in the /u03 directory, perform a grep search according to the search results, and search for text containing 9080.

The syntax format of -exec is:

Shell code Collection code
-exec command {} \;
There must be a space between {} and \, otherwise the above error will be reported.

Re-execute the command after adding a space:

Shell code Collection code
find /u03 -name server.xml -exec grep ‘9080’ {} \;

[Solved] The instance cannot be started due to the attribute change of the oracle file under the grid user

startup mount pfile=’/tmp/pfile0722.txt’

Error Message:
Fatal NI connect error 12547, connecting to:
(DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u01/grid/grid_home/18.0.0/bin/oracle)(ARGV0=oracle+ASM1_asmb_oradg1)(ENVS=’ORACLE_HOME=/u01/grid/grid_home/18.0.0,ORACLE_SID=+ASM1′)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))’))(SECURITY=(AUTHENTICATION_SERVICE=beq))(enable=setuser)(CONNECT_DATA=(CID=(PROGRAM=oracle)(HOST=rac01)(USER=oracle))))

VERSION INFORMATION:
TNS for Linux: Version 18.0.0.0.0 – Production
Oracle Bequeath NT Protocol Adapter for Linux: Version 18.0.0.0.0 – Production
Version 18.3.0.0.0
Time: 22-JUL-2021 23:37:09
Tracing not turned on.
Tns error struct:
ns main err code: 12547

TNS-12547: TNS:lost contact
ns secondary err code: 12560
nt main err code: 517

TNS-00517: Lost contact
nt secondary err code: 32
nt OS err code: 0

View file attributes:
/u01/grid/grid_home/18.0.0/bin/oracle

Wrong:
[grid@rac01 trace]$ ls -al /u01/grid/grid_home/18.0.0/bin/oracle
-rwxr-x–x 1 grid oinstall 413848192 Jul 16 03:01 /u01/grid/grid_home/ 18.0.0/bin/oracle

Correct
[root@rac02 ~]# ls -al /u01/grid/grid_home/18.0.0/bin/oracle
-rwsr-s–x 1 grid oinstall 413848192 Jul 16 03:24 /u01/grid/grid_home/18.0 .0/bin/oracle

The modification is consistent with the correct one:
[root@rac02 ~]#chmod gu+s /u01/grid/grid_home/18.0.0/bin/oracle

How to Solve Error: Linux permission denied

1. Preparation

For example, to create a script file for test.sh, the script code is as follows:

# ! /bin/bash 

echo Hello, world!

The function of the code is to output the characters Hello, world!

2. run the script

Switch to the directory where test.sh is located in the terminal and run the program, a Permission denied prompt appears, as follows:

[devel@localhost v2]$ ls
test.sh
[devel@localhost v2]$ chmod 111 test.sh
[devel@localhost v2]$ ls
[devel@localhost v2]$. / test.sh
 /bin/bash: ./test.sh: Permission denied

3.modify file permissions

This is that we can modify the file permissions with the help of the chmod command, as follows:

[devel@localhost v2] chmod 777 test.sh 
[devel@localhost v2] ./test.sh 
Hello,world!

add:

[devel@localhost v2] ./test_curl.sh profile_list get

Run the script, profile_list is the corresponding url, get is the request method.

end!