Tag Archives: Centos

Problem solving / etc/ rc.local The boot entry of the file configuration is invalid

Fixed issue: The boot entry for /etc/rc.local file configuration does not work
Start by looking at the contents of the /etc/rc.local file to find the cause of the problem.

[root@localhost ~]# cat /etc/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#**这This file was added for compatibility**
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#** It is highly advisable to create your own systemd services or udev rules to run scripts during boot instead of using this file. ***
# In contrast to previous versions due to parallel execution during boot
# This script will NOT be run after all other services.
#** In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. **Please note that you must run 'parallel execution during boot'.
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
#** Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot.
touch /var/lock/subsys/local
#**Create the file /var/lock/subsys/local**

According to the prompt, it may not execute because the file permissions are insufficient. So, first look at the permissions for the /etc/rc.local file.

[root@localhost ~]# ll /etc/rc.local
-rw-r--r--. 1 root root 13 Apr 21 23:06 /etc/rc.local -> rc.d/rc.local

/etc/rc.d/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local = /etc/rc.local

[root@localhost ~]# chmod +x /etc/rc.d/rc.local
[root@localhost ~]# ll /etc/rc.d/rc.local 
-rwxr-xr-x. 1 root root 13 Apr  21 23:06 /etc/rc.d/rc.local

After restarting the server, I found that the boot items set in the /etc/rc.local file are working properly.

command ‘gcc’ failed with exit status 1 error while installing scrapy

When I tried to install Scrapy I got this error:

    warning: no previously-included files found matching '*.py'
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in /usr/local/lib/python2.7/site-packages/pyOpenSSL-0.14-py2.7.egg (from Scrapy)
Requirement already satisfied (use --upgrade to upgrade): cssselect>=0.9 in /usr/local/lib/python2.7/site-packages/cssselect-0.9.1-py2.7.egg (from Scrapy)
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in /usr/local/lib/python2.7/site-packages/six-1.6.1-py2.7.egg (from Scrapy)
Downloading/unpacking zope.interface>=3.6.0 (from Twisted>=10.0.0->Scrapy)
  Downloading zope.interface-4.1.1.tar.gz (864kB): 864kB downloaded
  Running setup.py (path:/tmp/pip_build_root/zope.interface/setup.py) egg_info for package zope.interface

    warning: no previously-included files matching '*.dll' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->Scrapy)
  Downloading cryptography-0.4.tar.gz (260kB): 260kB downloaded
  Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    c/_cffi_backend.c:14:17: error: ffi.h: No such file or directory
    In file included from c/_cffi_backend.c:21:
    c/malloc_closure.h:33: error: expected specifier-qualifier-list before 'ffi_closure'
    c/malloc_closure.h: In function 'more_core':
    c/malloc_closure.h:69: warning: division by zero
    c/malloc_closure.h:96: error: 'union mmaped_block' has no member named 'next'
    c/malloc_closure.h: At top level:
    c/malloc_closure.h:105: error: expected ')' before '*' token
    c/malloc_closure.h:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    c/_cffi_backend.c:187: error: expected specifier-qualifier-list before 'ffi_cif'
    c/_cffi_backend.c: In function 'cdataowninggc_dealloc':
    c/_cffi_backend.c:1499: error: 'ffi_closure' undeclared (first use in this function)
    c/_cffi_backend.c:1499: error: (Each undeclared identifier is reported only once
    c/_cffi_backend.c:1499: error: for each function it appears in.)
    c/_cffi_backend.c:1499: error: 'closure' undeclared (first use in this function)
    c/_cffi_backend.c:1499: error: expected expression before ')' token
    c/_cffi_backend.c:1502: warning: implicit declaration of function 'cffi_closure_free'
    c/_cffi_backend.c: In function 'cdataowninggc_traverse':
    c/_cffi_backend.c:1514: error: 'ffi_closure' undeclared (first use in this function)
    c/_cffi_backend.c:1514: error: 'closure' undeclared (first use in this function)
    c/_cffi_backend.c:1514: error: expected expression before ')' token
    c/_cffi_backend.c: In function 'cdataowninggc_clear':
    c/_cffi_backend.c:1530: error: 'ffi_closure' undeclared (first use in this function)
    c/_cffi_backend.c:1530: error: 'closure' undeclared (first use in this function)
    c/_cffi_backend.c:1530: error: expected expression before ')' token
    c/_cffi_backend.c: In function 'cdataowning_repr':
    c/_cffi_backend.c:1654: error: 'ffi_closure' undeclared (first use in this function)
    c/_cffi_backend.c:1654: error: expected expression before ')' token
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:2200: error: expected declaration specifiers or '...' before 'ffi_abi'
    c/_cffi_backend.c: In function 'cdata_call':
    c/_cffi_backend.c:2334: error: 'ffi_abi' undeclared (first use in this function)
    c/_cffi_backend.c:2334: error: expected ';' before 'fabi'
    c/_cffi_backend.c:2376: error: 'fabi' undeclared (first use in this function)
    c/_cffi_backend.c:2380: error: too many arguments to function 'fb_prepare_cif'
    c/_cffi_backend.c:2385: error: 'cif_description_t' has no member named 'exchange_size'
    c/_cffi_backend.c:2395: error: 'cif_description_t' has no member named 'exchange_offset_arg'
    c/_cffi_backend.c:2425: error: 'cif_description_t' has no member named 'exchange_offset_arg'
    c/_cffi_backend.c:2430: warning: implicit declaration of function 'ffi_call'
    c/_cffi_backend.c:2430: error: 'cif_description_t' has no member named 'cif'
    c/_cffi_backend.c: In function 'b_new_primitive_type':
    c/_cffi_backend.c:3334: error: 'ffi_type' undeclared (first use in this function)
    c/_cffi_backend.c:3334: error: 'ffitype' undeclared (first use in this function)
    c/_cffi_backend.c:3355: error: 'ffi_type_sint8' undeclared (first use in this function)
    c/_cffi_backend.c:3356: error: 'ffi_type_sint16' undeclared (first use in this function)
    c/_cffi_backend.c:3357: error: 'ffi_type_sint32' undeclared (first use in this function)
    c/_cffi_backend.c:3358: error: 'ffi_type_sint64' undeclared (first use in this function)
    c/_cffi_backend.c:3364: error: 'ffi_type_float' undeclared (first use in this function)
    c/_cffi_backend.c:3366: error: 'ffi_type_double' undeclared (first use in this function)
    c/_cffi_backend.c:3368: error: 'ffi_type_longdouble' undeclared (first use in this function)
    c/_cffi_backend.c:3374: error: 'ffi_type_uint8' undeclared (first use in this function)
    c/_cffi_backend.c:3375: error: 'ffi_type_uint16' undeclared (first use in this function)
    c/_cffi_backend.c:3376: error: 'ffi_type_uint32' undeclared (first use in this function)
    c/_cffi_backend.c:3377: error: 'ffi_type_uint64' undeclared (first use in this function)
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:3931: error: expected specifier-qualifier-list before 'ffi_type'
    c/_cffi_backend.c:3950: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
    c/_cffi_backend.c: In function 'fb_build':
    c/_cffi_backend.c:4081: error: 'struct funcbuilder_s' has no member named 'atypes'
    c/_cffi_backend.c:4081: error: 'ffi_type' undeclared (first use in this function)
    c/_cffi_backend.c:4081: error: expected expression before ')' token
    c/_cffi_backend.c:4082: error: 'struct funcbuilder_s' has no member named 'nargs'
    c/_cffi_backend.c:4085: error: 'struct funcbuilder_s' has no member named 'rtype'
    c/_cffi_backend.c:4085: warning: implicit declaration of function 'fb_fill_type'
    c/_cffi_backend.c:4093: error: 'cif_description_t' has no member named 'exchange_offset_arg'
    c/_cffi_backend.c:4096: error: 'struct funcbuilder_s' has no member named 'rtype'
    c/_cffi_backend.c:4097: error: 'ffi_arg' undeclared (first use in this function)
    c/_cffi_backend.c:4107: error: 'atype' undeclared (first use in this function)
    c/_cffi_backend.c:4120: error: 'struct funcbuilder_s' has no member named 'atypes'
    c/_cffi_backend.c:4121: error: 'struct funcbuilder_s' has no member named 'atypes'
    c/_cffi_backend.c:4124: error: 'cif_description_t' has no member named 'exchange_offset_arg'
    c/_cffi_backend.c:4131: error: 'cif_description_t' has no member named 'exchange_size'
    c/_cffi_backend.c: In function 'fb_build_name':
    c/_cffi_backend.c:4153: error: 'struct funcbuilder_s' has no member named 'nargs'
    c/_cffi_backend.c:4162: error: 'struct funcbuilder_s' has no member named 'fct'
    c/_cffi_backend.c:4164: error: 'struct funcbuilder_s' has no member named 'fct'
    c/_cffi_backend.c: In function 'fb_prepare_ctype':
    c/_cffi_backend.c:4205: error: 'struct funcbuilder_s' has no member named 'fct'
    c/_cffi_backend.c:4215: error: 'struct funcbuilder_s' has no member named 'fct'
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:4235: error: expected declaration specifiers or '...' before 'ffi_abi'
    c/_cffi_backend.c: In function 'fb_prepare_cif':
    c/_cffi_backend.c:4262: warning: implicit declaration of function 'ffi_prep_cif'
    c/_cffi_backend.c:4262: error: 'cif_description_t' has no member named 'cif'
    c/_cffi_backend.c:4262: error: 'fabi' undeclared (first use in this function)
    c/_cffi_backend.c:4262: error: 'struct funcbuilder_s' has no member named 'nargs'
    c/_cffi_backend.c:4263: error: 'struct funcbuilder_s' has no member named 'rtype'
    c/_cffi_backend.c:4263: error: 'struct funcbuilder_s' has no member named 'atypes'
    c/_cffi_backend.c:4263: error: 'FFI_OK' undeclared (first use in this function)
    c/_cffi_backend.c: In function 'b_new_function_type':
    c/_cffi_backend.c:4280: error: 'FFI_DEFAULT_ABI' undeclared (first use in this function)
    c/_cffi_backend.c:4318: error: too many arguments to function 'fb_prepare_cif'
    c/_cffi_backend.c:4326: error: 'struct funcbuilder_s' has no member named 'nargs'
    c/_cffi_backend.c:4336: error: 'struct funcbuilder_s' has no member named 'nargs'
    c/_cffi_backend.c: In function 'convert_from_object_fficallback':
    c/_cffi_backend.c:4360: error: 'ffi_arg' undeclared (first use in this function)
    c/_cffi_backend.c: At top level:
    c/_cffi_backend.c:4432: error: expected ')' before '*' token
    c/_cffi_backend.c: In function 'b_callback':
    c/_cffi_backend.c:4503: error: 'ffi_closure' undeclared (first use in this function)
    c/_cffi_backend.c:4503: error: 'closure' undeclared (first use in this function)
    c/_cffi_backend.c:4524: error: 'ffi_arg' undeclared (first use in this function)
    c/_cffi_backend.c:4542: warning: implicit declaration of function 'cffi_closure_alloc'
    c/_cffi_backend.c:4559: warning: implicit declaration of function 'ffi_prep_closure'
    c/_cffi_backend.c:4559: error: 'cif_description_t' has no member named 'cif'
    c/_cffi_backend.c:4560: error: 'invoke_callback' undeclared (first use in this function)
    c/_cffi_backend.c:4560: error: 'FFI_OK' undeclared (first use in this function)
    c/_cffi_backend.c: In function 'init_cffi_backend':
    c/_cffi_backend.c:5489: error: 'FFI_DEFAULT_ABI' undeclared (first use in this function)
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/cryptography/setup.py", line 174, in <module>
        "test": PyTest,
      File "/usr/local/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 260, in __init__
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 285, in fetch_build_eggs
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 631, in resolve
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 871, in best_match
      File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 883, in obtain
      File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 335, in fetch_build_egg
      File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 595, in easy_install
      File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 625, in install_item
      File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 822, in install_eggs
      File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1028, in build_and_install
      File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1016, in run_setup
    distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1
    Complete output from command python setup.py egg_info:
    Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found

c/_cffi_backend.c:14:17: error: ffi.h: No such file or directory

In file included from c/_cffi_backend.c:21:

c/malloc_closure.h:33: error: expected specifier-qualifier-list before 'ffi_closure'

c/malloc_closure.h: In function 'more_core':

c/malloc_closure.h:69: warning: division by zero

c/malloc_closure.h:96: error: 'union mmaped_block' has no member named 'next'

c/malloc_closure.h: At top level:

c/malloc_closure.h:105: error: expected ')' before '*' token

c/malloc_closure.h:113: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

c/_cffi_backend.c:187: error: expected specifier-qualifier-list before 'ffi_cif'

c/_cffi_backend.c: In function 'cdataowninggc_dealloc':

c/_cffi_backend.c:1499: error: 'ffi_closure' undeclared (first use in this function)

c/_cffi_backend.c:1499: error: (Each undeclared identifier is reported only once

c/_cffi_backend.c:1499: error: for each function it appears in.)

c/_cffi_backend.c:1499: error: 'closure' undeclared (first use in this function)

c/_cffi_backend.c:1499: error: expected expression before ')' token

c/_cffi_backend.c:1502: warning: implicit declaration of function 'cffi_closure_free'

c/_cffi_backend.c: In function 'cdataowninggc_traverse':

c/_cffi_backend.c:1514: error: 'ffi_closure' undeclared (first use in this function)

c/_cffi_backend.c:1514: error: 'closure' undeclared (first use in this function)

c/_cffi_backend.c:1514: error: expected expression before ')' token

c/_cffi_backend.c: In function 'cdataowninggc_clear':

c/_cffi_backend.c:1530: error: 'ffi_closure' undeclared (first use in this function)

c/_cffi_backend.c:1530: error: 'closure' undeclared (first use in this function)

c/_cffi_backend.c:1530: error: expected expression before ')' token

c/_cffi_backend.c: In function 'cdataowning_repr':

c/_cffi_backend.c:1654: error: 'ffi_closure' undeclared (first use in this function)

c/_cffi_backend.c:1654: error: expected expression before ')' token

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:2200: error: expected declaration specifiers or '...' before 'ffi_abi'

c/_cffi_backend.c: In function 'cdata_call':

c/_cffi_backend.c:2334: error: 'ffi_abi' undeclared (first use in this function)

c/_cffi_backend.c:2334: error: expected ';' before 'fabi'

c/_cffi_backend.c:2376: error: 'fabi' undeclared (first use in this function)

c/_cffi_backend.c:2380: error: too many arguments to function 'fb_prepare_cif'

c/_cffi_backend.c:2385: error: 'cif_description_t' has no member named 'exchange_size'

c/_cffi_backend.c:2395: error: 'cif_description_t' has no member named 'exchange_offset_arg'

c/_cffi_backend.c:2425: error: 'cif_description_t' has no member named 'exchange_offset_arg'

c/_cffi_backend.c:2430: warning: implicit declaration of function 'ffi_call'

c/_cffi_backend.c:2430: error: 'cif_description_t' has no member named 'cif'

c/_cffi_backend.c: In function 'b_new_primitive_type':

c/_cffi_backend.c:3334: error: 'ffi_type' undeclared (first use in this function)

c/_cffi_backend.c:3334: error: 'ffitype' undeclared (first use in this function)

c/_cffi_backend.c:3355: error: 'ffi_type_sint8' undeclared (first use in this function)

c/_cffi_backend.c:3356: error: 'ffi_type_sint16' undeclared (first use in this function)

c/_cffi_backend.c:3357: error: 'ffi_type_sint32' undeclared (first use in this function)

c/_cffi_backend.c:3358: error: 'ffi_type_sint64' undeclared (first use in this function)

c/_cffi_backend.c:3364: error: 'ffi_type_float' undeclared (first use in this function)

c/_cffi_backend.c:3366: error: 'ffi_type_double' undeclared (first use in this function)

c/_cffi_backend.c:3368: error: 'ffi_type_longdouble' undeclared (first use in this function)

c/_cffi_backend.c:3374: error: 'ffi_type_uint8' undeclared (first use in this function)

c/_cffi_backend.c:3375: error: 'ffi_type_uint16' undeclared (first use in this function)

c/_cffi_backend.c:3376: error: 'ffi_type_uint32' undeclared (first use in this function)

c/_cffi_backend.c:3377: error: 'ffi_type_uint64' undeclared (first use in this function)

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:3931: error: expected specifier-qualifier-list before 'ffi_type'

c/_cffi_backend.c:3950: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token

c/_cffi_backend.c: In function 'fb_build':

c/_cffi_backend.c:4081: error: 'struct funcbuilder_s' has no member named 'atypes'

c/_cffi_backend.c:4081: error: 'ffi_type' undeclared (first use in this function)

c/_cffi_backend.c:4081: error: expected expression before ')' token

c/_cffi_backend.c:4082: error: 'struct funcbuilder_s' has no member named 'nargs'

c/_cffi_backend.c:4085: error: 'struct funcbuilder_s' has no member named 'rtype'

c/_cffi_backend.c:4085: warning: implicit declaration of function 'fb_fill_type'

c/_cffi_backend.c:4093: error: 'cif_description_t' has no member named 'exchange_offset_arg'

c/_cffi_backend.c:4096: error: 'struct funcbuilder_s' has no member named 'rtype'

c/_cffi_backend.c:4097: error: 'ffi_arg' undeclared (first use in this function)

c/_cffi_backend.c:4107: error: 'atype' undeclared (first use in this function)

c/_cffi_backend.c:4120: error: 'struct funcbuilder_s' has no member named 'atypes'

c/_cffi_backend.c:4121: error: 'struct funcbuilder_s' has no member named 'atypes'

c/_cffi_backend.c:4124: error: 'cif_description_t' has no member named 'exchange_offset_arg'

c/_cffi_backend.c:4131: error: 'cif_description_t' has no member named 'exchange_size'

c/_cffi_backend.c: In function 'fb_build_name':

c/_cffi_backend.c:4153: error: 'struct funcbuilder_s' has no member named 'nargs'

c/_cffi_backend.c:4162: error: 'struct funcbuilder_s' has no member named 'fct'

c/_cffi_backend.c:4164: error: 'struct funcbuilder_s' has no member named 'fct'

c/_cffi_backend.c: In function 'fb_prepare_ctype':

c/_cffi_backend.c:4205: error: 'struct funcbuilder_s' has no member named 'fct'

c/_cffi_backend.c:4215: error: 'struct funcbuilder_s' has no member named 'fct'

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:4235: error: expected declaration specifiers or '...' before 'ffi_abi'

c/_cffi_backend.c: In function 'fb_prepare_cif':

c/_cffi_backend.c:4262: warning: implicit declaration of function 'ffi_prep_cif'

c/_cffi_backend.c:4262: error: 'cif_description_t' has no member named 'cif'

c/_cffi_backend.c:4262: error: 'fabi' undeclared (first use in this function)

c/_cffi_backend.c:4262: error: 'struct funcbuilder_s' has no member named 'nargs'

c/_cffi_backend.c:4263: error: 'struct funcbuilder_s' has no member named 'rtype'

c/_cffi_backend.c:4263: error: 'struct funcbuilder_s' has no member named 'atypes'

c/_cffi_backend.c:4263: error: 'FFI_OK' undeclared (first use in this function)

c/_cffi_backend.c: In function 'b_new_function_type':

c/_cffi_backend.c:4280: error: 'FFI_DEFAULT_ABI' undeclared (first use in this function)

c/_cffi_backend.c:4318: error: too many arguments to function 'fb_prepare_cif'

c/_cffi_backend.c:4326: error: 'struct funcbuilder_s' has no member named 'nargs'

c/_cffi_backend.c:4336: error: 'struct funcbuilder_s' has no member named 'nargs'

c/_cffi_backend.c: In function 'convert_from_object_fficallback':

c/_cffi_backend.c:4360: error: 'ffi_arg' undeclared (first use in this function)

c/_cffi_backend.c: At top level:

c/_cffi_backend.c:4432: error: expected ')' before '*' token

c/_cffi_backend.c: In function 'b_callback':

c/_cffi_backend.c:4503: error: 'ffi_closure' undeclared (first use in this function)

c/_cffi_backend.c:4503: error: 'closure' undeclared (first use in this function)

c/_cffi_backend.c:4524: error: 'ffi_arg' undeclared (first use in this function)

c/_cffi_backend.c:4542: warning: implicit declaration of function 'cffi_closure_alloc'

c/_cffi_backend.c:4559: warning: implicit declaration of function 'ffi_prep_closure'

c/_cffi_backend.c:4559: error: 'cif_description_t' has no member named 'cif'

c/_cffi_backend.c:4560: error: 'invoke_callback' undeclared (first use in this function)

c/_cffi_backend.c:4560: error: 'FFI_OK' undeclared (first use in this function)

c/_cffi_backend.c: In function 'init_cffi_backend':

c/_cffi_backend.c:5489: error: 'FFI_DEFAULT_ABI' undeclared (first use in this function)

Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/cryptography/setup.py", line 174, in <module>

    "test": PyTest,

  File "/usr/local/lib/python2.7/distutils/core.py", line 112, in setup

    _setup_distribution = dist = klass(attrs)

  File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 260, in __init__

  File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 285, in fetch_build_eggs

  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 631, in resolve

  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 871, in best_match

  File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 883, in obtain

  File "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 335, in fetch_build_egg

  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 595, in easy_install

  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 625, in install_item

  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 822, in install_eggs

  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1028, in build_and_install

  File "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1016, in run_setup

distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log

Solution :

c/_cffi_backend. c:truth:error:ffi. h:No such file or directory
Install the libffi-devel package
yum install libffi-devel

The solution to frequently pop up “cannot find a valid baseurl for repo” error prompt box in CentOS 6.7

The situation is: CentOS 6.7 server cannot connect to the external network normally, and can only be used in the internal network. The “cannot find a valid baseurl for repo” error box pops up frequently. Here’s a screenshot:

As the system is running normally, it does not need to be updated. Therefore, by adjusting the system settings and setting the system to “never check for updates” and “never update”, this error box will not appear in the system. As shown in the figure below:

The problem of “value error: zero length field name in format” in Python 2.6.6 of CentOS 6.9

[root@MrYang ~]# python
Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from fabric.api import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/fabric/api.py", line 9, in <module>
    from fabric.context_managers import (cd, hide, settings, show, path, prefix,
  File "/usr/lib/python2.6/site-packages/fabric/context_managers.py", line 42, in <module>
    from fabric.state import output, win32, connections, env
  File "/usr/lib/python2.6/site-packages/fabric/state.py", line 9, in <module>
    from fabric.network import HostConnectionCache, ssh
  File "/usr/lib/python2.6/site-packages/fabric/network.py", line 24, in <module>
    import paramiko as ssh
  File "/usr/lib/python2.6/site-packages/paramiko/__init__.py", line 22, in <module>
    from paramiko.transport import SecurityOptions, Transport
  File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 89, in <module>
    class Transport(threading.Thread, ClosingContextManager):
  File "/usr/lib/python2.6/site-packages/paramiko/transport.py", line 103, in Transport
    _CLIENT_ID = 'paramiko_{}'.format(paramiko.__version__)
ValueError: zero length field name in format

When using the paramiko third-party library of python2.6.6 and python3.6 on centos6.9, the above error has been reported all the time

Python official recommendation str.format () to format strings, so using “{} / N”. Format (x) to process strings may encounter problems.

In Python 2 & gt; = 2.7 and python 3 & gt; = 3.1, str.format The positional parameter in () method can be omitted by default, but in Python 2 (& lt; 2.7) and python 3 (& lt; 3.1), you must display the specified (subscript starts from 0), otherwise “zero length field name in format” error will appear.

“{}CMD”.format( os.sep )# “{0} CMD”. Format can run normally in Python 2.7( os.sep )# in Python & lt; = 2.6 / 3.1, the specified subscript must be displayed, even if there is only one element.

Reference link: https://www.aliyun.com/jiaocheng/460757.html

SSD [failed] failed to mount / sysRoot solution

[Failed] Failed to mount /sysroot [Failed] Failed to mount /sysroot

[  OK  ] Reached target Remote File Systems (Pre).
[  OK  ] Reached target Remote File Systems.
[8.901016] SGI XFS with ACLs, security attributes, no debug enabled
[8.912417] XFS (nvme0n1p3): Mounting V5 Filesystem
[8.960550] XFS (nvme0n1p3): Starting recovery (logdev: internal)
[8.973696] XFS (nvme0n1p3): Metadata corruption detected at __write_verify+0xfd/0x110 [xfs], xfs_dir3_leaf1 block 0x1900a00
[8.984887] XFS (nvme0n1p3): Unmount and run xfs_repair
[8.990104] XFS (nvme0n1p3): First 64 bytes of corrupted metadata buffer:
[8.996876] ffff9d79d0a6e000: 00 00 00 00 00 00 00 00 3d f1 00 00 17 bf 25 cb  ........=.....%.
[9.005544] ffff9d79d0a6e010: 00 00 00 00 01 90 0a 00 00 00 00 26 00 00 a2 aa  ...........&....
[9.014214] ffff9d79d0a6e020: 11 51 07 ca d1 a4 47 1a a2 a5 c6 99 86 e3 c6 6d  .Q....G........m
[9.022885] ffff9d79d0a6e030: 00 00 00 00 02 00 00 42 01 f0 00 2d 00 00 00 00  .......B...-....
[9.031560] XFS (nvme0n1p3): xfs_do_force_shutdown(0x8) called from line 1391 of file fs/xfs/xfs_buf.c.  Return address = 0xffffffffc063afb7
[9.044120] XFS (nvme0n1p3): Corruption of in-memory data detected.  Shutting down filesystem
[9.052618] XFS (nvme0n1p3): Please umount the filesystem and rectify the problem(s)
[9.060415] XFS (nvme0n1p3): log mount/recovery failed: error -117
[9.066595] XFS (nvme0n1p3): log mount failed
[FAILED] Failed to mount /sysroot.
See 'systemctl status sysroot.mo
Generating "/run/initramfs/rdsosreport.txt"

Baidu the online method under the
# code xfs_repair - v - L/dev/dm - 0
on failure, seemingly equipment is wrong, the dm to nvme0n1p3 0, perform OK, the following figure

:/# xfs_repair -v -L /dev/nvme0n1p3
Phase 1 - find and verify superblock...
        - block cache size set to 3003408 entries
Phase 2 - using internal log
        - zero log...
zero_log: head block 42497 tail block 42014
ALERT: The filesystem has valuable metadata changes in a log which is being
destroyed because the -L option was used.
        - scan filesystem freespace and inode maps...
out-of-order bno btree record 9 (289310 2) block 0/1
block (0,289310-289310) multiply claimed by bno space tree, state - 1
agi unlinked bucket 2 is 1214018 in ag 2 (inode=68322882)
agi unlinked bucket 10 is 1215178 in ag 2 (inode=68324042)
agi unlinked bucket 13 is 1140429 in ag 2 (inode=68249293)
agi unlinked bucket 14 is 1213902 in ag 2 (inode=68322766)
agi unlinked bucket 15 is 1215183 in ag 2 (inode=68324047)
agi unlinked bucket 17 is 1140433 in ag 2 (inode=68249297)
agi unlinked bucket 18 is 1215186 in ag 2 (inode=68324050)
agi unlinked bucket 20 is 1140436 in ag 2 (inode=68249300)
agi unlinked bucket 26 is 157018 in ag 2 (inode=67265882)
agi unlinked bucket 29 is 1214045 in ag 2 (inode=68322909)
agi unlinked bucket 30 is 1214430 in ag 2 (inode=68323294)
agi unlinked bucket 37 is 1213989 in ag 2 (inode=68322853)
agi unlinked bucket 39 is 1213991 in ag 2 (inode=68322855)
agi unlinked bucket 40 is 1213992 in ag 2 (inode=68322856)
agi unlinked bucket 41 is 1213993 in ag 2 (inode=68322857)
agi unlinked bucket 44 is 1213996 in ag 2 (inode=68322860)
agi unlinked bucket 49 is 1214001 in ag 2 (inode=68322865)
agi unlinked bucket 54 is 1214006 in ag 2 (inode=68322870)
sb_ifree 254, counted 228
sb_fdblocks 10399804, counted 10408087
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
data fork in ino 1797907 claims free block 238369
imap claims a free inode 2180228 is in use, correcting imap and clearing inode
cleared inode 2180228
        - agno = 1
imap claims in-use inode 33968729 is free, correcting imap
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
entry "default.hostsfile" in shortform directory 565517 references free inode 2180236
junking entry "default.hostsfile" in directory inode 565517
Phase 5 - rebuild AG headers and trees...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
entry "tmp" in directory inode 100786852 not consistent with .. value (34441335) in inode 2180231,
junking entry
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
disconnected dir inode 2180231, moving to lost+found
disconnected inode 67265882, moving to lost+found
disconnected inode 67313620, moving to lost+found
disconnected inode 68249293, moving to lost+found
disconnected inode 68249297, moving to lost+found
disconnected inode 68249300, moving to lost+found
disconnected inode 68322766, moving to lost+found
disconnected inode 68322853, moving to lost+found
disconnected inode 68322855, moving to lost+found
disconnected inode 68322856, moving to lost+found
disconnected inode 68322857, moving to lost+found
disconnected inode 68322860, moving to lost+found
disconnected inode 68322865, moving to lost+found
disconnected inode 68322870, moving to lost+found
disconnected inode 68322882, moving to lost+found
disconnected inode 68322909, moving to lost+found
disconnected inode 68322910, moving to lost+found
disconnected inode 68323294, moving to lost+found
disconnected inode 68324042, moving to lost+found
disconnected inode 68324047, moving to lost+found
disconnected inode 68324050, moving to lost+found
Phase 7 - verify and correct link counts...
resetting inode 33554498 nlinks from 451 to 452
resetting inode 100786852 nlinks from 3 to 2
resetting inode 2180228 nlinks from 2 to 3
resetting inode 2180237 nlinks from 1 to 2
Maximum metadata LSN (38:42014) is ahead of log (1:2).
Format log to cycle 41.

        XFS_REPAIR Summary    Thu Jan 19 06:06:46 2017

Phase		Start		End		Duration
Phase 1:	01/19 06:06:46	01/19 06:06:46	
Phase 2:	01/19 06:06:46	01/19 06:06:46	
Phase 3:	01/19 06:06:46	01/19 06:06:46	
Phase 4:	01/19 06:06:46	01/19 06:06:46	
Phase 5:	01/19 06:06:46	01/19 06:06:46	
Phase 6:	01/19 06:06:46	01/19 06:06:46	
Phase 7:	01/19 06:06:46	01/19 06:06:46	

Total run time: 
done
:/# 

Then perform

:/# xfs_repair dev/nvme0n1p3

The results are as follows

Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
Phase 3 - for each AG...
        - scan and clear agi unlinked lists...
        - process known inodes and perform inode discovery...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
        - process newly discovered inodes...
Phase 4 - check for duplicate blocks...
        - setting up duplicate extent list...
        - check for inodes claiming duplicate blocks...
        - agno = 0
        - agno = 1
        - agno = 2
        - agno = 3
Phase 5 - rebuild AG headers and trees...
        - reset superblock...
Phase 6 - check inode connectivity...
        - resetting contents of realtime bitmap and summary inodes
        - traversing filesystem ...
        - traversal finished ...
        - moving disconnected inodes to lost+found ...
Phase 7 - verify and correct link counts...
done
:/# 

Mount can succeed, too

:/# mount -o rw dev/nvme0n1p3 /data0
[  853.650067] XFS (nvme0n1p3): Mounting V5 Filesystem
[  853.777152] XFS (nvme0n1p3): Ending clean mount
:/# cd data0/
:/data0# ls
bin   compass  etc   lib    lost+found	mnt  proc  run	 srv  tmp   usr
boot  dev      home  lib64  media	opt  root  sbin  sys  upan  var
:/data0# 

Let’s try that again

CentOS Linux 7 (Core)
Kernel 3.10.0-862.11.6.el7.x86_64 on an x86_64

localhost login: 

done

VMware virtual machine installation of vmware tools, VMware shared folder location

VMware Virtual Machine installs VMware Tools, VMware shared folder location
The default shared path for VMware ToolsvMware is at/MNT/HGFS

VMware Virtual Machine installs VMware Tools

yum -y Update
m -y Install Net-Tools perl GCC GCC C ++ kernel-headers kernel-devel
When the update is complete, restart the server
reboot
Click
virtual machine (M)-> on the virtual machine screen; Install the VMware Tools
mkdir -p /home
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
Cp/MNT/cdrom/VMwareTools – 10.3.2-9925305. The tar. Gz/home
CD /home
tar ZXVF vmwaretools-10.3.2-9925305.tar.gz
vmware-tools-distrib
CD vmware-tools-distrib
./vmware-install.pl
Just keep hitting enter,
Restart CentOS when done
Once installed, the HGFS directory is automatically created under/MNT
The default shared path for VMware is at/MNT/HGFS
If the shared/MNT/HGFS file is still not found, reinstall the VMware Tools

Centos8 solves the problem of “failed to set locale, defaulting to c.utf-8”

Problem description

>
>
>
>
>
>
>
>
>

systemctl status mysqld.service

journalctl -xe


Failed to set locale, defaulting to C.UTF-8
How to solve
To set the system locale, use the localectl command. For example, if you want to use UTF-8 encoded American English (US), run the following command.
download centos docker mirror system default is ISO/IEC 15897 character set
need to utf-8.
to install all of the first character set

dnf install langpacks-en glibc-all-langpacks -y

Set character set

localectl set-locale LANG=en_US.UTF-8

Restart the mysql
bingo!!!!!!
success

Plug in loaded: fastmirror, langpacks / var / run/ yum.pid Locked, another program with PID 2323 is running

Question:
The plugin is loaded: FastestMirror, Langpacks
/var/run/yum.pid is locked and another program with pid 2323 is running.
Another app is currently holding the yum lock; waiting for it to exit…
Another application: PackageKit
Memory: 155 MB RSS (574 MB VSZ)
Started: Mon Mar 23 14:13:26 2020-01:07 before
Status: Running, process ID: 2323
Solution:
[root@chao ~]#

rm -f /var/run/yum.pid