Tag Archives: ubuntu

[Solved] Ubuntu Startup Errors were found while checking the disk-drive for /

The main reason for this error is that the hard disk fails to pass the test. Here are two ways to avoid this problem:

Modify grub

This method is quite popular on the Internet. Post it directly:

When entering the Startup menu of Ubuntu, select * Ubuntu with the cursor, and press the e key on the keyboard to enter the startup item editing mode

Use the cursor to locate the position as shown in the figure below, change RO to RW, and press F10 to guide the system according to the modified parameters

Enter sudo GEDIT/etc/grub.d/10_ Enter after lupin:

Enter the user password and press enter to call the text editor to open the boot item configuration file, and replace ro ${args} with RW ${args}

Save the file, then sudo update grub updates grub, and restart

Disable hard disk detection

The first method may lead to similar problems in the future. The most fundamental method is to prohibit Ubuntu from checking the hard disk when it starts. So how to prohibit it

Modify the/etc/fstab file, change the last digit 1/2 of the corresponding line of each mount item to 0, and then save it

# < file system> < mount point> < type> < options> < dump> < pass>

#/was on /dev/sda1 during installation

UUID=80c83157-8cfd-46e8-be12-993d5fcb6c20/ ext4 defaults 0 0

# /boot was on /dev/sda6 during installation

UUID=04197eeb-babf-4568-8686-cf4a31751827 /boot ext4 defaults 0 0

# /opt was on /dev/sda5 during installation

UUID=8685f4ea-3b2e-4bce-a729-a7a0629925f1 /opt ext4 defaults 0 0

# swap was on /dev/sda7 during installation

UUID=90de3311-1664-4532-8677-fa1f665af82a none swap sw 0 0

~

fatal error: Python.h: No such file or directory solution methods

Fatal error: Python.h: No such file or directory under Ubuntu

Install the python-devlibrary according to the Python version used .

sudo apt-get install python-dev   # for python2.x installs
sudo apt-get install python3-dev  # for python3.x installs

For example, in the case of using Python 3.6, pass:

sudo apt-get install python3.6-dev

Install python-dev.

“Failed to load ldlinux. C32” appears during Ubuntu installation

After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>

“Failed to load ldlinux. C32” appears during Ubuntu installation

Using UltraISO to make the U disk of Ubuntu 18.04 to start, the F12 key appears when the USB starts

one

two

Failed to load ldlinux.c32

Boot failed: please change disks and press a key to

continue

There are many queries on the Internet and many attempts have been made

Guess if there is something wrong with the writing mode when the production starts, try several writing modes (usb-hdd, usb-hdd +, usb-zip), and all fail

Finally, select the write mode “raw”, success, the problem is solved, and the system can be started smoothly when installing

select “raw” as the writing mode when recording image, and solve it successfully

PS: use raw mode to write the Ubuntu system to the U disk. At this time, in my computer, the size of the U disk becomes 2MB. Don’t panic. Next blog https://www.cnblogs.com/yuanyufei/p/11387879.html This problem can be solved

Source of the original text: https://www.cnblogs.com/yuanyufei/p/11387773.html

Error installing wxPython in Ubuntu: failed to build wxPython

Why can’t you stop buying 618?From the technical dimension to explore>>>

In recent days, I’m installing wxPython. I want to try it on my Ubuntu. As a result, I can’t install it. I haven’t found the information for several days, and the error report is as follows:

Collecting wxpython
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/cb/4f/1e21d3c079c973ba862a18f3be73c2bbe2e6bc25c96d94df605b5cbb494d/wxPython-4.1.0.tar.gz (65.8 MB)
Requirement already satisfied: pillow in ./miniconda3/envs/label/lib/python3.7/site-packages (from wxpython) (7.2.0)
Requirement already satisfied: six in ./miniconda3/envs/label/lib/python3.7/site-packages (from wxpython) (1.15.0)
Requirement already satisfied: numpy in ./miniconda3/envs/label/lib/python3.7/site-packages (from wxpython) (1.19.1)
Building wheels for collected packages: wxpython
  Building wheel for wxpython (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/frank/miniconda3/envs/label/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ykws_i7y/wxpython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ykws_i7y/wxpython/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 /tmp/pip-wheel-cgy5ip8x
       cwd: /tmp/pip-install-ykws_i7y/wxpython/
  Complete output (138 lines):
  running bdist_wheel
  running build
  WARNING: Building this way assumes that all generated files have been
  generated already.  If that is not the case then use build.py directly
  to generate the source and perform the build stage.  You can use
  --skip-build with the bdist_* or install commands to avoid this
  message and the wxWidgets and Phoenix build steps in the future.
  
  "/home/frank/miniconda3/envs/label/bin/python" -u build.py build
  Will build using: "/home/frank/miniconda3/envs/label/bin/python"
  3.7.7 (default, May  7 2020, 21:25:33)
  [GCC 7.3.0]
  Python's architecture is 64bit
  cfg.VERSION: 4.1.0
  
  Running command: build
  Running command: build_wx
  wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
  Configure options: ['--enable-unicode', '--with-gtk=3', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
  /tmp/pip-install-ykws_i7y/wxpython/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking for toolkit... gtk
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking whether we are using the Intel C compiler... no
  checking how to run the C preprocessor... gcc -E
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking whether gcc needs -traditional... no
  checking for g++... g++
  checking whether we are using the GNU C++ compiler... yes
  checking whether g++ accepts -g... yes
  checking whether we are using the Intel C++ compiler... no
  checking whether we are using the Sun C++ compiler... no
  checking for ar... ar
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for langinfo.h... yes
  checking for wchar.h... yes
  checking for sys/select.h... yes
  checking for cxxabi.h... yes
  checking for an ANSI C-conforming const... yes
  checking for inline... inline
  checking size of short... 2
  checking size of void *... 8
  checking size of int... 4
  checking size of long... 8
  checking size of size_t... 8
  checking size of long long... 8
  checking size of wchar_t... 4
  checking for va_copy... yes
  checking whether the compiler supports variadic macros... yes
  checking for _FILE_OFFSET_BITS value needed for large files... 64
  checking if large file support is available... yes
  checking for _LARGEFILE_SOURCE value needed for large files... no
  checking whether byte ordering is bigendian... no
  checking for std::wstring in <string>... yes
  checking for std::istream... yes
  checking for std::ostream... yes
  checking for type_traits... yes
  checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... yes
  checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
  checking for cos... no
  checking for floor... no
  checking if floating point functions link without -lm... no
  checking for sin... yes
  checking for ceil... yes
  checking if floating point functions link with -lm... yes
  checking for strtoull... yes
  checking for pkg-config... /usr/bin/pkg-config
  checking pkg-config is at least version 0.9.0... yes
  configure: WARNING: Defaulting to the builtin regex library for Unicode build.
  checking for zlib.h >= 1.1.4... yes
  checking for zlib.h... (cached) yes
  checking for deflate in -lz... yes
  checking for png.h > 0.90... yes
  checking for png.h... (cached) yes
  checking for png_sig_cmp in -lpng... yes
  checking for jpeglib.h... no
  configure: WARNING: system jpeg library not found, will use built-in instead
  checking lzma.h usability... no
  checking lzma.h presence... no
  checking for lzma.h... no
  checking for jbg_dec_init in -ljbig... no
  checking for LIBTIFF... not found via pkg-config
  checking for tiffio.h... no
  configure: WARNING: system tiff library not found, will use built-in instead
  checking for expat.h... yes
  checking if expat.h is valid C++ header... yes
  checking for XML_ParserCreate in -lexpat... yes
  checking for GTK+ version...
  checking for pkg-config... (cached) /usr/bin/pkg-config
  checking pkg-config is at least version 0.16... yes
  checking for GTK+ - version >= 3.0.0... Package gtk+-3.0 was not found in the pkg-config search path.
  Perhaps you should add the directory containing `gtk+-3.0.pc'
  to the PKG_CONFIG_PATH environment variable
  No package 'gtk+-3.0' found
  no
  *** Could not run GTK+ test program, checking why...
  *** The test program failed to compile or link. See the file config.log for the
  *** exact error that occurred. This usually means GTK+ is incorrectly installed.
  configure: error:
  The development files for GTK+ were not found. For GTK+ 2, please
  ensure that pkg-config is in the path and that gtk+-2.0.pc is
  installed. For GTK+ 1.2 please check that gtk-config is in the path,
  and that the version is 1.2.3 or above. Also check that the
  libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
  --libs' are in the LD_LIBRARY_PATH or equivalent.
  
  Error running configure
  ERROR: failed building wxWidgets
  Traceback (most recent call last):
    File "build.py", line 1471, in cmd_build_wx
      wxbuild.main(wxDir(), build_options)
    File "/tmp/pip-install-ykws_i7y/wxpython/buildtools/build_wxwidgets.py", line 373, in main
      "Error running configure")
    File "/tmp/pip-install-ykws_i7y/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError
      raise builder.BuildError(msg)
  buildtools.builder.BuildError: Error running configure
  Finished command: build_wx (0m3.965s)
  Finished command: build (0m3.965s)
  Command '"/home/frank/miniconda3/envs/label/bin/python" -u build.py build' failed with exit code 1.
  ----------------------------------------
  ERROR: Failed building wheel for wxpython
  Running setup.py clean for wxpython
Failed to build wxpython
Installing collected packages: wxpython
    Running setup.py install for wxpython ... error
    ERROR: Command errored out with exit status 1:
     command: /home/frank/miniconda3/envs/label/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ykws_i7y/wxpython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ykws_i7y/wxpython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-a2fpjt6w/install-record.txt --single-version-externally-managed --compile --install-headers /home/frank/miniconda3/envs/label/include/python3.7m/wxpython
         cwd: /tmp/pip-install-ykws_i7y/wxpython/
    Complete output (138 lines):
    running install
    running build
    WARNING: Building this way assumes that all generated files have been
    generated already.  If that is not the case then use build.py directly
    to generate the source and perform the build stage.  You can use
    --skip-build with the bdist_* or install commands to avoid this
    message and the wxWidgets and Phoenix build steps in the future.
    
    "/home/frank/miniconda3/envs/label/bin/python" -u build.py build
    Will build using: "/home/frank/miniconda3/envs/label/bin/python"
    3.7.7 (default, May  7 2020, 21:25:33)
    [GCC 7.3.0]
    Python's architecture is 64bit
    cfg.VERSION: 4.1.0
    
    Running command: build
    Running command: build_wx
    wxWidgets build options: ['--wxpython', '--unicode', '--gtk3']
    Configure options: ['--enable-unicode', '--with-gtk=3', '--enable-sound', '--enable-graphics_ctx', '--enable-display', '--enable-geometry', '--enable-debug_flag', '--enable-optimise', '--disable-debugreport', '--enable-uiactionsim', '--enable-autoidman', '--with-sdl']
    /tmp/pip-install-ykws_i7y/wxpython/ext/wxWidgets/configure --enable-unicode --with-gtk=3 --enable-sound --enable-graphics_ctx --enable-display --enable-geometry --enable-debug_flag --enable-optimise --disable-debugreport --enable-uiactionsim --enable-autoidman --with-sdl
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking for toolkit... gtk
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether we are using the Intel C compiler... no
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking whether gcc needs -traditional... no
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking whether we are using the Intel C++ compiler... no
    checking whether we are using the Sun C++ compiler... no
    checking for ar... ar
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for langinfo.h... yes
    checking for wchar.h... yes
    checking for sys/select.h... yes
    checking for cxxabi.h... yes
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking size of short... 2
    checking size of void *... 8
    checking size of int... 4
    checking size of long... 8
    checking size of size_t... 8
    checking size of long long... 8
    checking size of wchar_t... 4
    checking for va_copy... yes
    checking whether the compiler supports variadic macros... yes
    checking for _FILE_OFFSET_BITS value needed for large files... 64
    checking if large file support is available... yes
    checking for _LARGEFILE_SOURCE value needed for large files... no
    checking whether byte ordering is bigendian... no
    checking for std::wstring in <string>... yes
    checking for std::istream... yes
    checking for std::ostream... yes
    checking for type_traits... yes
    checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... yes
    checking for libraries directories... /usr/lib/x86_64-linux-gnu /usr/lib
    checking for cos... no
    checking for floor... no
    checking if floating point functions link without -lm... no
    checking for sin... yes
    checking for ceil... yes
    checking if floating point functions link with -lm... yes
    checking for strtoull... yes
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    configure: WARNING: Defaulting to the builtin regex library for Unicode build.
    checking for zlib.h >= 1.1.4... yes
    checking for zlib.h... (cached) yes
    checking for deflate in -lz... yes
    checking for png.h > 0.90... yes
    checking for png.h... (cached) yes
    checking for png_sig_cmp in -lpng... yes
    checking for jpeglib.h... no
    configure: WARNING: system jpeg library not found, will use built-in instead
    checking lzma.h usability... no
    checking lzma.h presence... no
    checking for lzma.h... no
    checking for jbg_dec_init in -ljbig... no
    checking for LIBTIFF... not found via pkg-config
    checking for tiffio.h... no
    configure: WARNING: system tiff library not found, will use built-in instead
    checking for expat.h... yes
    checking if expat.h is valid C++ header... yes
    checking for XML_ParserCreate in -lexpat... yes
    checking for GTK+ version...
    checking for pkg-config... (cached) /usr/bin/pkg-config
    checking pkg-config is at least version 0.16... yes
    checking for GTK+ - version >= 3.0.0... Package gtk+-3.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `gtk+-3.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'gtk+-3.0' found
    no
    *** Could not run GTK+ test program, checking why...
    *** The test program failed to compile or link. See the file config.log for the
    *** exact error that occurred. This usually means GTK+ is incorrectly installed.
    configure: error:
    The development files for GTK+ were not found. For GTK+ 2, please
    ensure that pkg-config is in the path and that gtk+-2.0.pc is
    installed. For GTK+ 1.2 please check that gtk-config is in the path,
    and that the version is 1.2.3 or above. Also check that the
    libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
    --libs' are in the LD_LIBRARY_PATH or equivalent.
    
    Error running configure
    ERROR: failed building wxWidgets
    Traceback (most recent call last):
      File "build.py", line 1471, in cmd_build_wx
        wxbuild.main(wxDir(), build_options)
      File "/tmp/pip-install-ykws_i7y/wxpython/buildtools/build_wxwidgets.py", line 373, in main
        "Error running configure")
      File "/tmp/pip-install-ykws_i7y/wxpython/buildtools/build_wxwidgets.py", line 85, in exitIfError
        raise builder.BuildError(msg)
    buildtools.builder.BuildError: Error running configure
    Finished command: build_wx (0m2.892s)
    Finished command: build (0m2.892s)
    Command '"/home/frank/miniconda3/envs/label/bin/python" -u build.py build' failed with exit code 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/frank/miniconda3/envs/label/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ykws_i7y/wxpython/setup.py'"'"'; __file__='"'"'/tmp/pip-install-ykws_i7y/wxpython/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-a2fpjt6w/install-record.txt --single-version-externally-managed --compile --install-headers /home/frank/miniconda3/envs/label/include/python3.7m/wxpython Check the logs for full command output.

What should we do?Today’s sudden fantasy with CONDA, the result is OK, God is not magical

conda install wxpython

Note that python = = 3.7 in CONDA

[Solved] Ubuntu Install caffe error: build_release/tools/caffe: error while loading shared libraries: libcudart.so.8….

1. There are three solutions on the Internet:

1) this is GitHub’s solution. Link: https://github.com/tensorflow/tensorflow/issues/5343

It can be seen that this method is still effective

2) execution order:

1 sudo ldconfig /usr/local/cuda/lib64

This feeling is ok too

3) if the above two methods are still unsolved, try the following:

The main reason for this kind of problem is that libcudart. So. 8.0 can’t be found in/usr/local/lib/directory, which can be found in usr/local/cuda-8.0/lib64/directory. Therefore, we copy libcudart. So. 8.0 through the following command. Remember to add sudo permission, otherwise it may not be copied
execute command:

1 sudo cp /usr/local/cuda-8.0/lib64/libcudart.so.8.0 /usr/local/lib/libcudart.so.8.0 && sudo ldconfig

This is where there will also be.

./build/tools/caffe: error while loading shared libraries: libcublas.so.8.0: cannot open shared object file: can not open shared object file: No such file or directory
./build/tools/caffe: error while loading shared libraries: libcurand.so.8.0: cannot open shared object file: can not open shared object file: No such file or directory
./build/tools/caffe: error while loading shared libraries: libcudnn.so.6: cannot open shared object file: can not open shared object file: No such file or directory
The corresponding name marked in yellow in the command can be changed

Execution is complete and there are no more errors!!!

How to fix the “kernel driver not installed (RC = – 1908)” error of VirtualBox in Ubuntu

I use Oracle VirtualBox to test various Linux and Unix distributions. So far, I have tested hundreds of virtual machines in VirtualBox. Today, I started the Ubuntu 18.04 Server Edition virtual machine on my Ubuntu 18.04 desktop and I received the following error.

Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall virtualbox-dkms package and load the kernel module by executing
'modprobe vboxdrv'
as root.
where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

Kernel driver not installed (rc=-1908)” error in Ubuntu

I clicked OK to close the message box, and then I saw another message in the background.

Failed to open a session for the virtual machine Ubuntu 18.04 LTS Server.
The virtual machine 'Ubuntu 18.04 LTS Server' has terminated unexpectedly during startup with exit code 1 (0x1).
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
MachineWrap
Interface:
IMachine {85cd948e-a71f-4289-281e-0ca7ad48cd89}

The VM terminates unexpectedly during startup with exit code 1 (0x1)

I don’t know what to do first. I run the following command to check if it works.

$ sudo modprobe vboxdrv

I received this error.

modprobe: FATAL: Module vboxdrv not found in directory /lib/modules/5.0.0-23-generic

After reading these two error messages carefully, I realized that I should update the Virtualbox program.

If you encounter this error in Ubuntu and its derivatives (such as Linux Mint), you can simply reinstall or update the virtualbox-dkms package using the following command.

$ sudo apt install virtualbox-dkms

Or, better yet, update the entire system with.

$ sudo apt upgrade

The error is gone and I can start the virtual machine normally in VirtualBox

Ubuntu can’t find libc. So. 6

Open source software supply chain lighting plan, waiting for you>>>

In fact, this library exists in Ubuntu, but the place has changed. Under the “/ lib/i386 Linux GNU /”, we just need to create a link. Use the following command:

root@ubuntuJack :/lib/i386-linux-gnu# ln -s /lib/i386-linux-gnu/libc-2.15.so /lib/libc.so.6

Error in make menuconfig on Ubuntu [How to Solve]

If you use make menuconfig to configure the kernel, and it happens that the ncurses library is not installed in the system (this library is not installed by default in the Ubuntu system), an error will occur. The error message is as follows:

*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] Error 1
make: *** [menuconfig] Error 2


The solution is as simple as installing the ncurses library, which can be done on ubuntu/debian systems with the following command.

$sudo apt-get install libncurses5-dev

Ncurses library is the basic library for screen control under character terminal, and many newly developed programs may not be used, but it is often used when compiling some old programs

Unable to start mongod after installing mongodb in Ubuntu

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

I’m going to learn mongodb today. I didn’t expect that the server could not be started after downloading. I’d like to record the problems and handling process

I. installation

It’s still very easy to install in Ubuntu, direct: sudo apt install mongodb

2. Start

Start mongodb server: enter mongod (or use the sudo service mongodb start command to start the terminal in the background without blocking the terminal. Here I use the blocking terminal start mode)

An error occurred: exception in initandlisten: nonexistentpath: data directory/data/DB not found., terminating # prompt that the/data/DB folder is missing

Create folder: MKDIR – P/data/db

Start mongod again: exception in initandlisten: illegaloperation: committed to create a lock file on a read-only Directory:/data/DB, terminating # prompt that the permission of/data/DB folder is read-only

Modify folder permissions: sudo Chmod a + W/data/DB # set folder permissions to writable

When mongod is started again, there is still an error: failed to set up listener: socketexception: address already in use # indicating that the address has been occupied

Take a look at the current connection of mongodb: PS – ef|grep Mongo
mongodb 52874 10:27?00:00:05/usr/bin/mongod — unixsocketprefix =/run/mongodb — config/etc/mongodb. Conf
Horace 53796 53687 0 10:43 PTS/1 00:00:00 grep — color = auto Mongo
has been started

Then we restart once: enter mongodb client: enter Mongo
and then enter:
use admin
dB. Shutdown server ()?Close mongodb server

Try again: mongod
success

It’s not easy to install mongodb. I don’t know if there is a problem with my installation. That’s why there are so many problems

How to Solve MYSQL error “no directory, logging in with home = -“

Prerequisites: Using the system’s environment
3.13.0-24-generic

Version of mysql: 5.6.33

Error description.
The first error reported with mysqld_safe start is as follows.

root@zabbix-forFunction:~# mysqld_safe
170425 01:56:52 mysqld_safe Can’t log to error log and syslog at the same time. Remove all –log-error configuration options for –syslog to take effect.
170425 01:56:52 mysqld_safe Logging to ‘/var/log/mysql/error.log’.
170425 01:56:52 mysqld_safe A mysqld process already exists
root@zabbix-forFunction:~# ps -aux | grep mysql
mysql 1472 0.1 15.5 1752260 625824 ?Ssl Apr24 1:16 /usr/sbin/mysqld
root 10160 0.0 0.0 15952 920 pts/3 S+ 01:59 0:00 grep –color=auto mysql

At this time, use /etc/init.d/mysql stop to stop the mysql service and find that the mysql process is still present, you need to use the following command to stop the process.

root@zabbix-forFunction:~# sudo service mysql stop
mysql stop/waiting
root@zabbix-forFunction:~# ps -aux | grep mysql
root 13531 0.0 0.0 15948 920 pts/3 S+ 02:15 0:00 grep –color=auto mysql

Use the usermod command to relocate the directory where mysql is located.

root@zabbix-forFunction:~# sudo usermod -d /var/lib/mysql/ mysql
Then restart the mysql service again at

root@zabbix-forFunction:~# sudo service mysql start
mysql start/running, process 13597