Tag Archives: Failed

[Solved] Vue3 npm ERR code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC

Vue3 npm ERR code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC

1. Vue3 create project error

vue create test1

 npm ERR! code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC

The detailed error is as follows:

npm ERR! code ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
npm ERR! 2240:error:1408F119:SSL routines:ssl3_get_record:decryption failed or bad record mac:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:677:
npm ERR!

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\qianle102\AppData\Local\npm-cache\_logs\2022-05-28T07_44_19_121Z-debug-0.log
 ERROR  Error: command failed: npm install --loglevel error --legacy-peer-deps
Error: command failed: npm install --loglevel error --legacy-peer-deps
    at ChildProcess.<anonymous> (C:\Users\qianle102\AppData\Roaming\npm\node_modules\@vue\cli\lib\util\executeCommand.js:138:16)
    at ChildProcess.emit (node:events:527:28)
    at ChildProcess.cp.emit (C:\Users\qianle102\AppData\Roaming\npm\node_modules\@vue\cli\node_modules\cross-spawn\lib\enoent.js:34:29)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

The second error is the error of the python download command. That is, the python command is used during the installation of vue3.

If Python is not installed on this computer, an error will be reported.

2. Solutions

Download the phthon installation package and install the python framework

[Solved] Angular12 ng build Error: Index html generation failed.

When using angular12 (version 12.0.3) to develop a project, the debugging will run normally, but an error message will appear when calling ng build to publish.

Tip: index HTML generation failed undefined:6:720366 missing ‘}’

Or: index HTML generation failed Undefined: 6:720366 missing ‘:’ etc.

The solution is to modify the angular.json configuration file, Add an optimization node under the build -> configurations ->production node:

            "optimization": {
                "scripts": true,
                "fonts": {
                  "inline": true
                },
                "styles": {
                  "minify": true,
                  "inlineCritical": false
                }
              }

The complete node path is:

{
    ...,
    "projects":{
        "myapp":{
           ...,
           "architect":{
               ...,
                "build":{
                    ...,
                    "configurations":{
                        ...,
                        "production": {
                            ..., 
                            "optimization": {
                                "scripts": true,
                                "fonts": {
                                  "inline": true
                                },
                                "styles": {
                                  "minify": true,
                                  "inlineCritical": false
                                }
                              }                       
                        }                                           
                    },
                    ...                                    
                },
                ...                          
           },
           ...         
        }            
    },
    ...
}

[PHP]stream_socket_client(): Failed to enable crypto

Problem recurrence:

<?php
function getCertInfo($domain)
{
    $context = stream_context_create([
        'ssl' => [
            'capture_peer_cert'       => true,
            'capture_peer_cert_chain' => true,
        ],
    ]);

    $client = stream_socket_client("ssl://{$domain}:443", $errorCode, $errorMessage, 30, STREAM_CLIENT_CONNECT, $context);
    if ($client === false) {
        var_dump("!!!open {$domain} socket connection fail. {$errorMessage}($errorCode) !!!";
        return false;
    }

    $params = stream_context_get_params($client);
    if (empty($params['options']['ssl']['peer_certificate'])) {
        var_dump("!!!{$domain} stream_context_get_params options ssl peer_certificate is empty!!!");
        return false;
    }

    return openssl_x509_parse($params['options']['ssl']['peer_certificate']);
}

Solution: $context add verify_ Peer configuration

<?php 
$context = stream_context_create([
    'ssl' => [
        'capture_peer_cert'       => true,
        'capture_peer_cert_chain' => true,
        'verify_peer'             => false,
    ],
]);

termux Failed to initialize runtime

Failed to initialize runtime solution appears when using ECJ or DX command in termux

The error report said that I had to check the log. Because I didn’t know much about Android system, I chose to check what ECJ did

Enter the path as shown in the figure

cd ~/../usr/bin

Cat ECJ later found that he was actually executing the command dalvikvm

So cat dalvikvm finds the following in this command

The two lines I marked had no comments

Open dalvikvm through VI or vim and comment out the above two lines. You can use it normally

Note out the following two lines

export ANDROID_ DATA=/data/data/com.termux/files/usr/var/android/
mkdir -p $ANDROID_ DATA/dalvik-cache

)You can use ECJ

Cause analysis:

Because the directory will exist after being used, the execution fails

 
Here is the original: https://github.com/termux/termux-packages/issues/1107

The scheme failed with ‘command’ failed

PIP install pylibmc installation failure and its solution. During installation, the following errors are reported, and there may be other errors, similar to the following:

pip install pylibmc==1.6.1
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pylibmc==1.6.1
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/0c/f7a3af34b05c167a69ed1fc330b06b658dac4ab25b8632c52d1022dd5337/pylibmc-1.6.1.tar.gz (64 kB)
Building wheels for collected packages: pylibmc
  Building wheel for pylibmc (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-wheel-73t1n0ft
       cwd: /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/
  Complete output (28 lines):
  /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
    with open("README.rst", "U", encoding="utf-8") as r:
  /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
    with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.15-x86_64-3.8
  creating build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/autoconf.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/pools.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/client.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/test.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/consts.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  copying src/pylibmc/__main__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
  running build_ext
  building '_pylibmc' extension
  creating build/temp.macosx-10.15-x86_64-3.8
  creating build/temp.macosx-10.15-x86_64-3.8/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -DUSE_ZLIB -I/Users/yangchangjia/PycharmProjects/Nox/venv/include -I/Users/yangchangjia/.pyenv/versions/3.8.6/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.macosx-10.15-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
  In file included from src/_pylibmcmodule.c:34:
  src/_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
  #include <libmemcached/memcached.h>
           ^~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for pylibmc
  Running setup.py clean for pylibmc
Failed to build pylibmc
Installing collected packages: pylibmc
    Running setup.py install for pylibmc ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-record-tox14kc6/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yangchangjia/PycharmProjects/Nox/venv/include/site/python3.8/pylibmc
         cwd: /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/
    Complete output (28 lines):
    /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:98: DeprecationWarning: 'U' mode is deprecated
      with open("README.rst", "U", encoding="utf-8") as r:
    /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py:100: DeprecationWarning: 'U' mode is deprecated
      with open("src/pylibmc-version.h", "U", encoding="utf-8") as r:
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.15-x86_64-3.8
    creating build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/autoconf.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/pools.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/client.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/__init__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/test.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/consts.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    copying src/pylibmc/__main__.py -> build/lib.macosx-10.15-x86_64-3.8/pylibmc
    running build_ext
    building '_pylibmc' extension
    creating build/temp.macosx-10.15-x86_64-3.8
    creating build/temp.macosx-10.15-x86_64-3.8/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include -DUSE_ZLIB -I/Users/yangchangjia/PycharmProjects/Nox/venv/include -I/Users/yangchangjia/.pyenv/versions/3.8.6/include/python3.8 -c src/_pylibmcmodule.c -o build/temp.macosx-10.15-x86_64-3.8/src/_pylibmcmodule.o -fno-strict-aliasing -std=c99
    In file included from src/_pylibmcmodule.c:34:
    src/_pylibmcmodule.h:42:10: fatal error: 'libmemcached/memcached.h' file not found
    #include <libmemcached/memcached.h>
             ^~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/yangchangjia/PycharmProjects/Nox/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"'; __file__='"'"'/private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-install-14fh8zn_/pylibmc/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/x7/zprpyfhx3h3g5qs3c_z_gxqc0000gn/T/pip-record-tox14kc6/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yangchangjia/PycharmProjects/Nox/venv/include/site/python3.8/pylibmc Check the logs for full command output.

Solution:

brew install libmemcached
pip install wheel
pip install pylibmc

Installation successful:

pip install pylibmc
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting pylibmc
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a7/0c/f7a3af34b05c167a69ed1fc330b06b658dac4ab25b8632c52d1022dd5337/pylibmc-1.6.1.tar.gz (64 kB)
Building wheels for collected packages: pylibmc
  Building wheel for pylibmc (setup.py) ... done
  Created wheel for pylibmc: filename=pylibmc-1.6.1-cp38-cp38-macosx_10_15_x86_64.whl size=33323 sha256=9a8ecb4933b8a455b7ffe9db042011f3a9865c18441b8e5204d843bc0e6da1a3
  Stored in directory: /Users/yangchangjia/Library/Caches/pip/wheels/a1/8e/7e/d1b6684901c01de15a45efb8b5172c1dc7b9c6a7386d369839
Successfully built pylibmc
Installing collected packages: pylibmc
Successfully installed pylibmc-1.6.1

PCL Programming Notes — assertion ` PX! = 0 ‘failed

Reference: http://blog.csdn.net/mnonm_mnonm_mnonm/article/details/8706659

Error: boost: : from… Assertion `px ! = 0′ failed.
Reason: The smart pointer is uninitialized.
Processing: Initialize.
Such as

PointCloudT::Ptr cloud;

The compiler can pass, but the program will report the above error when run, after the following initialization, the error disappeared.

PointCloudT::Ptr cloud=boost::make_shared <PointCloudT> ();

Chrome browser network error: err_ CERT_ AUTHORITY_ INVALID

Reprint please indicate the author (DuGuShangLiang dugushangliang) reference: https://blog.csdn.net/dugushangliang/article/details/85275319
 
NET::ERR_CERT_COMMON_NAME_INVALID, NET::ERR_CERT_AUTHORITY_INVALID, etc. NET::ERR_CERT_AUTHORITY_INVALID, etc.
Tries all the browsers on this machine: Chrome, Firefox, Internet Explorer, Microsoft Edge, by clicking: Advanced, continue to go to, can open, but in the open interface for some operations, display a variety of errors, can not achieve the expected results, Chrome F12 to view the network, as follows:

This problem has been torturing for a long time, I have repeatedly antivirus, repair system, uninstall and reinstall, and so on, still have this problem.
And finally, it dawned on me what the problem was.
As shown in the figure below, the interface I just opened is an overview. I want to view the data, so I click “Data” with the mouse, and an error occurs.

Error reporting occurs when a page jumps or when we click on a page widget, so we open the Developer Tools before the error occurs. Chrome can be opened directly by pressing F12. In this case, it opens when the page is just opened and the interface is an overview. Then we carry out page operation, such as clicking a button, in this case, clicking “Data” to switch to the data interface. At this time, an error will be reported. When we check the network, we find red information.

We select the red message to see the details. Under headers, we’ll find the request URL, and in that URL we’ll find a question mark “?” “, copied all the URLs in front of the question mark, such as: https://www.xxx.com/… /0, open another TAB and try to visit the URL by pasting it into the URL bar and going to

As shown in the following picture, the prompt from Chrome browser will prompt that the connection is not secure, so we choose to continue. Firefox will say “Added as an exception.”
above
 
That was the problem, and when the site was successfully opened, our problem was solved. The default setting is to deny access to this site because it has not been made an exception first, so you will get an error if you go directly to this site via the link.
I searched up and down, forget all about eating and sleeping, sweat and sweat, and was also an accidental opportunity (that is, accidentally opened the website, so was added exceptions, so later on normal) to solve, but did not know the problem at that time. Later, by chance, I figured it out and verified the situation, and added the reasons for reference. This is like Duan Yu mistakenly into Wulianshan Jian Lake Palace, obtained the same martial arts secret books. Tap-stamping iron shoes have no place to find, the original trouble me for a long time, is such a simple small problem.
If there are people who don’t understand this article, don’t criticize them. If there are any problems, let’s try to solve them. After all, there are multiple possible causes of the same or similar symptoms. If you’re here to find fault, don’t bother to add a comment.)
(September 26, 2019, and the other an open, discusses related development solution: https://blog.csdn.net/dugushangliang/article/details/101421339).
 
Solitary and good Dugushangliang

php open(/var/lib/php/session/sess_4ofxxx, O_RDWR) failed: Permission denied (13)

Meet
session_start () :
open (/ var/opt/remi php72/lib/PHP/session/sess_4ofga8ehv8s2ct2b9dnn40qtp2, O_RDWR) failed: Permission denied (13)
Error message

session_start(): open(/var/opt/remi/php72/lib/php/session/sess_4ofga8ehv8s2ct2b9dnn40qtp2, O_RDWR) failed: Permission denied (13)

Solutions:

sudo chmod 1733 [报错的session的路径]

The solution for the above example is as follows

sudo chmod 1733 /var/opt/remi/php72/lib/php/session

Refer to the article

Conversion to dalvik format failed with error 1 solution

Note: transfer to http://dev.wo.com.cn/docportal/doc_queryMdocDetail.action?Mdoc docindex = 6540
 
Resource description:

1. If you do not modify the Android SDK version, use the Project Clean command to work on a project.
(this process is only compatible with the lower version of the project in the higher version, not a real upgrade)

2. If the android SDK version is modified, the following steps are required:

1) modify the SDK

select project, buildpath –> configure build path —> Library delete the lower version of referenced SDK,
then add ExternalJARs, select the higher version SDK,OK, save

2) modify the classpath file

the file may have this item :< Classpathentry kind=”lib” path =” higher version address you specify “
change her to < classpathentrykind=”con”path=”com.android.ide.eclipse.adt.ANDROID_FRAMEWORK” />

3) modify androidmanifest.xml

add &lt after the application tag in the androidmanifest.xml file; uses-sdkandroid:minSdkVersion=”3″> < /uses-sdk>

4) modify default.properties (very important)

the last line of the file (not used in the previous #) target=android-3 target=android-8, save.
look again at your project and the new android2.2 project structure. 3. Many problems occurred in the development of Android Project in eclipse can be used to Project– > Clean is easy to solve.
but if it appears that the Android library cannot be found, or accidentally removed the Android library, how can you add the Android library again?

in eclipse Java Build Path can not add such as Android 2.1 defined system libraries. However, I tried to manually add android.jar in the SDK folder
, which showed a Conversion to Dalvik format failed with error 1. After playing around with
for a while, many users said that using Projectclean would solve the problem, but in my case, it was useless.

solution:

modify the project classpath file, which makes me understand, directly from other normal projects into the
< ! Note that this.classpath file is located in the Eclipse workspace hard disk location under the project directory –>
< Classpathentry kind=”lib”path =” Address of custom JAR “/>

modified to www.2cto.com
< classpathentry kind=”con”path=”com.android.ide.eclipse.adt.ANDROID_FRAMEWORK”/> .

like this refresh project, Android system library Android 2.1 is back, that error is resolved.
— — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — —
this several days again encountered such a problem, however. The classpath file already contains the above con inside Path, then found a new method on BBS:

project -> properties -> androidlabel, check a target from the project build target list

< ! — Sometimes the error cannot be removed. At this time, please pay attention when entering project-> properties -> After android, there is a
is library item below, tick it, and then click “OK”. This is how my error was solved. At first, I could not solve it according to
above and the following methods.
(is library)
(is library)
(is library)
(is library)
; There is another case: the package conflict, please go to the project directory to remove the same package, re-import one, this is similar to the first case, but this is for other packages, not android package

solution: Java Build Path-> Libraries-> JARs and class folders on thebuild path
see if there are identical JARs some jar versions are not necessarily android JARs other library JARs can also cause such errors
last time signpost-core-1[1].2.1.1.jar and signpost-core-1.2.1.1.jar conflicts this occurs so you have to see if there are identical JARs

Compared with before is the fourth kind of situation, I’m from others that take an examination of a andengine game engine code, me to his libs folder is set as the source folder, and then put inside the jar package add to the buildpath, then came the problem of subject, checked a lot of solution, no solution, then carefully observed my question and the fourth is like, put the jar all removed, and then reload time, under this solved, ha ha, here the method summary posted, convenient viewing.

 

Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING

error message:

Failed to load resource: net::ERR_INCOMPLETE_CHUNKED_ENCODING

environmental phenomena

chrome

chrome browser, the previous access to the interface is what, access to the error of this url, the interface is still what looks like, but does not respond to mouse and keyboard events!
press F12 to open the debug window. An error message appears:

IE compatible kernel

IE compatible kernel browser, after opening the interface is blank, press F12, open the debugging window, display the following content:

error cause:

online search, there are articles mentioned is response.close, response.end and so on caused, but I visited the JSP page, how can it be related to this!

based on this page on another problem occurred “HTTP Status 500 – /online.jsp (line: 495, column: 2) File [/foot.jsp] not found” opened the JSP page code analysis, found the problem:
actually USES JSP :include

<jsp:include flush="true" page="/head.jsp" ></jsp:include>

The

head.jsp file does not exist, which results in this problem!

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
PS: mice no girlfriend particularly depressed, finally a bat agreed to marry him, the mouse is very happy. Others laugh him to have no vision, mouse: you understand what, she somehow is a stewardess.

Installation error: install_ FAILED_ VERSION_ DOWNGRADE

1. Problem tip

2. Solution

is because you have installed an application with the same package name on your phone or emulator, and the current versionCode you are running is less than the versionCode of the application you have installed, so you will be prompted that the installation fails!

solution:

1. Uninstall the Apk that has been installed before.

2. Raise the value of android:versionCode in the manifest profile!

resources: http://stackoverflow.com/questions/13808599/android-emulator-installation-error-install-failed-version-downgrade

Determining IP information for eth0… failed; no link present. Check cable?

recently, there are too many things in my life, I have been wanting to learn Linux operating system well, but I have no time.

last night, ready to configure the FTP server, the results found that the virtual machine and the local network connection is not connected, baidu online once, the problem was quickly solved, so will solve the problem to share out.

>

1, use ifconfig command to check the RedHat network device (network interface card), found that eth0 network card did not start.

2. So I use the ifup eth0 command to enable the network interface eth0, and I realize that I cannot start today. failed; no link present. Check cable?”

solution:

1. The connection mode between the virtual machine and the machine is: host-only mode. I will not introduce the differences between several connection modes. If the previous connection was not host-only, the virtual machine will need to be restarted after the change.

2. Start the two virtual network CARDS of the machine.

3. Add the following script in /etc/sysconfig/network-scripts/ifcfg-eth0:
check_link_down() {
return 1;
}

specific operation is as follows:

enter the following command:

[root@localhost root]# cd /etc/sysconfig/network-scripts/
[root@localhost network-scripts]# vi ifcfg-eth0


return 1;
check_link_down() {
return 1;
check_link_down() {
return 1;
check_link_down() {
return 1;
}

Next, restart the network (if it doesn’t work, restart the system!).
[root@localhost network-scripts]# ifup eth0
Determining IP information for eth0… done.


ok, see the above prompt indicates that it has been successful, you can check if you have got a valid IP by ifconfig.

Finally, check on the machine to see if you can PING the Linux operating system in the virtual machine