Tag Archives: linux

Solution to “error: invalid environment block” when Ubuntu starts up

Solution to “error: invalid environment block” when Ubuntu starts up

1. Error status 2. Solution


1. Error status

When starting Ubuntu with grub, some errors are displayed below:

error: invalid environment block

Press any key to continue...

2. Solutions

Execute the following instructions:

sudo cd /boot/grub
sudo rm grubenv
sudo grub-editenv grubenv create
sudo grub-editenv grubenv set default=0

Now check whether it is feasible

grub-editenv grubenv list
# default=0

Restart again should have no problem.


thank you

Error about XX error 1 querying major version

Error Code 1: Myelin (cuBLASLt error 1 querying major version.)

This error is because the appropriate version information is not found. When looking for dynamic link libraries in some libraries, they will look for them according to the version information behind so . If they are not found, an error will be reported.

resolvent:

Set all the version suffixes of. So to find the path. OK~

For example, use the ln - s libcublaslt.so.11 libcublaslt.so.11.5.2.43 command to set the corresponding so:

 libcublasLt.so -> libcublasLt.so.11
 libcublasLt.so.11
 libcublasLt.so.11.5.2.43 -> libcublasLt.so.11

Error in startup after the supervisor modifies the configuration file: error: cannot open an HTTP server: socket.error reported errno.eaddnotavail

 vim /etc/supervisord.conf

Modify the configuration file
remove the comments of the [inet_http_server] module
and modify the default IP, user name and password

after modification, reload the configuration file:

supervisorctl reload

At this time, it is found that the supervisor service has stopped, systemctl status supervisor View Status:

this is generally an error in the configuration file:
note that the local address is not filled in after the port, such as 47.xxx.xxx.xxx , which refers to who can access the server’s supervisor. If it is not filled in, everyone can access it. For example, it can be directly changed to port =: 9001 , and then reload.

 supervisorctl reload
 systemctl start supervisord

If it is set that everyone can access, you can log in to the browser:

I layhill successfully solved the problem through the above methods. Please correct the deficiencies!

Using JWT of distributed deployment services Error: JWT check failure:

===2021-09-18 15:55:14.445 ERROR [http-nio-8014-exec-6] com.croot.common.utils.JwtTokenKit Line:72 – JWT Check Failure:
io.jsonwebtoken.PrematureJwtException: JWT must not be accepted before 2021-09-18T15:55:42Z. Current time: 2021-09-18T15:55:14Z, a difference of 27556 milliseconds. Allowed clock skew: 0 milliseconds.
Synchronize server time
Write a script:

Add permissions for the script to be executable by all users for later testing: chmod a+x test.sh
Stop the crond service: service crond stop
Add timed tasks:
[root@CloudDeskTop install]# crontab -e

* * * * * /bin/sh /install/test.sh

View scheduled tasks:
[ root@CloudDeskTop install]# crontab -l

* * * * * /bin/sh /install/test.sh

View which users have scheduled tasks:
[ root@CloudDeskTop ~]# ls /var/spool/cron
root

Start the crond service: service crond start

Check whether there is a test.log file in the/install/directory;

Display the contents of test.log in real time: Tail – F test.log

How to Solve No approve protocol error when running kettle on Linux

No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

Deploy kettle on Linux, and then run the test script for sending e-mail. The error is as follows:

org.pentaho.di.core.exception.KettleException: 
Can not send mail!
Could not connect to SMTP host: smtp.exmail.qq.com, port: 465
	at org.pentaho.di.trans.steps.mail.Mail.processRow(Mail.java:510)
	at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
	at java.lang.Thread.run(Thread.java:748)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.exmail.qq.com, port: 465;
  nested exception is:
	javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1961)
	at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:654)
	at javax.mail.Service.connect(Service.java:295)
	at org.pentaho.di.trans.steps.mail.Mail.sendMail(Mail.java:713)
	at org.pentaho.di.trans.steps.mail.Mail.processRow(Mail.java:493)
	... 2 more
Caused by: javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
	at sun.security.ssl.HandshakeContext.<init>(HandshakeContext.java:171)
	at sun.security.ssl.ClientHandshakeContext.<init>(ClientHandshakeContext.java:101)
	at sun.security.ssl.TransportContext.kickstart(TransportContext.java:238)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:394)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:373)
	at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:549)
	at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:354)
	at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:237)
	at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1927)
	... 6 more

The main error is: no approve protocol (protocol is disabled or cipher suits are inappropriate)

Solution:
find the folder where the JDK is installed
find the file:/jdk1.8.0_ 301/JRE/lib/security/Java. Security
find the configuration:

jdk.tls.disabledAlgorithms=SSLv3, TLSv1, TLSv1.1, RC4, DES, MD5withRSA, \
DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, \
include jdk.disabled.namedCurves

Remove the SSLv3, TLSv1, TLSv1.1,

Restart kettle script can solve the error.

[Solved] Error in porting libzrtp: automake-1.14: command not found

Error:

cd . && /bin/bash /home/disk//libzrtp/src/config/missing automake-1.14 –gnu
/home/disk/libzrtp/src/config/missing: line 81: automake-1.14: command not found
WARNING: ‘automake-1.14’ is missing on your system.
You should only need it if you modified ‘Makefile.am’ or
‘configure.ac’ or m4 files included by ‘configure.ac’.
The ‘automake’ program is part of the GNU Automake package:
http://www.gnu.org/software/automake
It also requires GNU Autoconf, GNU m4 and Perl in order to run:
http://www.gnu.org/software/autoconf
http://www.gnu.org/software/m4/
http://www.perl.org/
make[2]: *** [Makefile.in] Error 1

Principle:
1, the execution of autoscan will generate a configure.scan file, which can be used as a blueprint for the configure.in file.
2. Execute aclocal and autoconf, which will generate aclocal.m4 and configure files respectively.
The specific operations.

./autoscan
./aclocal
./autoconf
automake –add-missing
./configure

Solve the error in installing aclocal-1.6 for splint

//splint-3.1.1/config/missing: line 46: aclocal-1.6: command not found
WARNING: `aclocal-1.6' is needed, and you do not seem to have it handy on your
         system.  You might have modified some files without having the
         proper tools for further handling them.  Check the `README' file,
         it often tells you about the needed prerequirements for installing
         this package.  You may also peek at any GNU archive site, in case
         some other package would contain this missing `aclocal-1.6' program

Solution:
1. Install automake sudo apt get install automake
2. If automake is installed, the version should not correspond. If you manually enter aclocal without an error, modify the makefile of splint, and manually delete the version number after aclocal and automake, followed by

How to Solve Mysql8 load data error

First, when executing the load data command, a message appears, loading local data is disabled; this must be enabled on both the client and server sides
Set needs to be set on the server side   local_infile=1

And set MySQL — local infile = 1 – uroot – P when connecting to the client

The MySQL server is running with the –secure-file-priv option so it cannot execute this statement

The mysql.ini file already exists in the installed MySQL directory. You need to create a new my.ini file and add

[mysqld]
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin
secure-file-priv=

 

[Solved] PHP Fatal error: Uncaught Error: Class ‘Redis‘ not found in

The problem is that the redis class cannot be captured in the message

However, I have installed redis and used it in PHP code, but when I execute PHP jifen.php in Linux system, I report that redis class cannot be found.

Solution:

First, determine if there are two PHP in your system.

find/-name php

Then find your current PHP Directory:

Use phpinfo () in the PHP file; Method, you can access it

My PHP files are at /www/server/PHP/73/

Modify the system environment file:/etc/profile

vi /etc/profile

Write the PHP environment address to the end of the configuration file


The PHP runtime files are inside the bin directory, so mine is: /www/server/php/73/bin/

export PATH=$PATH:your PHP address

Save, exit, and then run:

source /etc/profile

Restart the PHP file to use PHP jifen.php

 

Pip3 install Mysqlclient Error: Command “python setup.py egg_info“ failed with error

pip3 install mysqlclient error Command “python setup.py egg_info” failed with error
1. Software description

    centos 8.0python3.6

2. Problem description
Use the command

pip3 install mysqlclient
error
[root@z ~]# pip3 install mysqlclient
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip3 install --user` instead.
Collecting mysqlclient
  Using cached https://files.pythonhosted.org/packages/3c/df/59cd2fa5e48d0804d213bdcb1acb4d08c403b61c7ff7ed4dd4a6a2deb3f7/mysqlclient-2.0.3.tar.gz
    Complete output from command python setup.py egg_info:
    /bin/sh: mysql_config: Command not found
    /bin/sh: mariadb_config: Command not found
    /bin/sh: mysql_config: Command not found
    mysql_config --version
    mariadb_config --version
    mysql_config --libs
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-8k22usrq/mysqlclient/setup.py", line 15, in <module>
        metadata, options = get_config()
      File "/tmp/pip-build-8k22usrq/mysqlclient/setup_posix.py", line 70, in get_config
        libs = mysql_config("libs")
      File "/tmp/pip-build-8k22usrq/mysqlclient/setup_posix.py", line 31, in mysql_config
        raise OSError("{} not found".format(_mysql_config_path))
    OSError: mysql_config not found
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8k22usrq/mysqlclient/

3. Solutions

yum install python3-devel mysql-devel