Tag Archives: linux

Linux yum Error: All mirror URLs are not using ftp

All mirror URLs are not using ftp, http[s] or file

Because the support of centos6 has been officially stopped

To solve this problem, execute the following command:

sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo

yum clean all

yum makecache

It’s OK

Idea stuck and error reported: UI was frozen for xxxxx MS problem solving

Phenomenon

After idea starts and clicks a menu, there is no reaction at all. When you click close, you can’t close it. Check the log and report the following error:

➜  bin 2021-04-30 00:20:31,777 [ 317987]   WARN - .diagnostic.PerformanceWatcher - UI was frozen for 5750ms, details saved to /home/zeek/.cache/JetBrains/IntelliJIdea2020.3/log/threadDumps-freeze-20210430-002031-IU-203.7148.57-RandomAccessFile.readBytes-5sec 
2021-04-30 00:20:45,194 [ 331404]   WARN - s.ui.configuration.SdkDetector - No version is returned for detected SDK IDEA JDK at /home/zeek/software/idea-IU-203.7148.57 
2021-04-30 00:22:05,304 [ 411514]   WARN - ystem.impl.ActionPopupMenuImpl - 1174ms to fill popup menu ProjectViewPopup 
2021-04-30 00:22:33,250 [ 439460]   WARN - ConfigurableExtensionPointUtil - ignore deprecated groupId: language for id: preferences.language.Kotlin.scripting 
2021-04-30 00:22:33,426 [ 439636]   WARN - ConfigurableExtensionPointUtil - use other group instead of unexpected one: build.android 
2021-04-30 00:22:44,580 [ 450790]   WARN - .diagnostic.PerformanceWatcher - UI was frozen for 12256ms, details saved to /home/zeek/.cache/JetBrains/IntelliJIdea2020.3/log/threadDumps-freeze-20210430-002237-IU-203.7148.57-ShowSettingsAction.perform-12sec

It was serious at the beginning, and I don’t know the specific reason.

Processing steps

First of all, because I use Linux operating system, the default JDK is openjdk 11. Generally speaking, openjdk is not as stable as Oracle JDK, and openjdk 11 is too new, so the default JDK of Jiujiang operating system is Oracle JDK 9.

➜  bin java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

Secondly, because the default memory used by idea is about 700m, insufficient memory may also lead to the above situation. Therefore, the running memory of idea is adjusted to 2G, and the configuration file is idea installation directory/bin/idea64. Vmoptions . The configuration content is as follows (only the sizes of – XMS and – Xmx are modified)

-Xms512m
-Xmx2048m
-XX:ReservedCodeCacheSize=512m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-XX:CICompilerCount=2
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-ea
-Dsun.io.useCanonCaches=false
-Djdk.http.auth.tunneling.disabledSchemes=""
-Djdk.attach.allowAttachSelf=true
-Djdk.module.illegalAccess.silent=true
-Dkotlinx.coroutines.debug=off
-Dsun.tools.attach.tmp.only=true

Finally, disable some plug-ins that you can’t use at ordinary times.

After the above three steps, the idea Caton phenomenon is not so obvious (invisible to the naked eye).


Title: idea stuck and error: UI was frozen for xxxxx MS problem solving
Author: zeekling
tips: Please note that the article is reproduced from personal blog: Xiaoling children’s shoes

docker.errors.DockerException: Error while fetching server API version: (‘Connection aborted.‘, File

Problem description

ocker.errors.DockerException: Error while fetching server API version: (‘Connection aborted.’, FileNotFoundError(2, ‘No such file or directory’))

Causes

The reason is that docker did not start

terms of settlement

Open docker:

systemctl start docker

Look at docker process

ps -ef | grep docker

Final execution

docker-compose up -d

Create a new project in pycharm: modulenotfounde rror:No module named ‘distutils.util‘

The error is as follows:

Don’t panic. It’s not a big problem

When installing pycharm in the Ubuntu system and creating a new project, prompt

ModuleNotFoundError: No module named ‘distutils.util’

The reason is that Ubuntu 18.04 does not install PIP by default, so you need to install python3 pip,

Enter the command in the terminal:

sudo apt-get install python3-pip

When you create a new project again, the problem can be solved

Change root to Oracle, and error: can’t open display: can’t open

If we find the error can’t open when we install Oracle Software display:127.0.0.1 :0.0   , probably   Display can’t find the graphic link library corresponding to 127.0.0.1, so you need to use export display =: 0.0 to make the system automatically find the matching graphic link library,

And modify the overall settings in/home/Oracle /. Bash_ The display parameter in the profile file is =: 0.0.

export DISPLAY= localhost:10.0

Use the xclock command to test the result, if it still reports an error.

Maybe it’s the root environment when the GUI logs in, and then you convert it to an Oracle environment, such as   su –   oracle   , This may also lead to this error. Error: Can’t open display:127.0..0.1 :0.0    
 
Suppose that the Linux account for installing Oracle Software is Oracle,    Then we need to log in to the GUI directly as an Oracle user instead of switching to Oracle after logging in as root,    We can set the VNC corresponding to the Oracle user (to install the user environment settings of Oracle)   , Then login VNC as Oracle user to install.

 
If there is a libxp type error, it may be that the RPM package of libxp is not installed.

[Solved] fatal: could not read Username for

Total: could not read username for ‘http:// solution

After deploying the clone (cicd software), when the commit is triggered, the problem occurs when the clone runner executes the pull warehouse code (on his deployed gogs)

Initialized empty Git repository in /drone/src/.git/
+ git fetch origin +refs/heads/master:
fatal: could not read Username for 'http://ip:port': terminal prompts disabled

The reason is that you need to enter the user name and password, but because this is cicd software, there is no time to enter the password, so there are two solutions:

Using SSH, you can produce git public key on the server where drone is located and upload it to code hosting (I use the gogs built by myself here, but there will also be GitHub, gitea, gitee, gitlab, etc.), so that you don’t need to download and upload the user name and password, and use the memory password mechanism of GIT to save the user name and password

Enter the server where the drone is located, log in with the drone process user, enter the home directory ( Cd ~ ) and execute git clone [your git code path] , and find that you need to enter a password, Ctrl + C interrupt execution touch. Git credentials create. Git credentials file execute vim. Git credentials edit the file, press I key to enter edit mode, enter: HTTP (s):// {your user name}: {your password} @ your git server address [Note: select HTTPS/HTTP, Remove curly brackets] press ESC Enter : WQ save and exit to execute git config -- global credential.helper store cat ~ /. Gitconfig found one more item:

[credential]
helper = store

Explain that it has been configured. Try again git clone [your git code path] no need to enter a password

Fatal: could not read username for ‘http://…’: terminal prompts disabled problem solving~

Mobile phone code termux

Recommend two apps, termux and better terminal, and search directly in the app store.

The purpose of using this app is to let beginners experience learning Linux system, or let you have a portable server, intranet penetration and so on.

Below is how to turn on SSH

———————

With termux, you can easily convert your mobile phone into Linux to practice or learn

If you feel inconvenient, you can use Google input method or hacker input method

Feel not used to external keyboard, OTG adapter can be used, about five dollars look, very convenient, you can also read and write U disk

If you think the screen is small, you can use SSH to connect your mobile phone. You can use any SSH tool on your computer to connect your mobile phone

Common shortcut keys for mobile phone to operate termux——————–

The Ctrl key is a key commonly used by end users – but most touch keyboards don’t have it. To do this, termux uses the volume down button to simulate the Ctrl key.  
for example, on the touch keyboard, press to decrease the volume button+   L sends the same input as pressing Ctrl + L on the hardware keyboard.

Ctrl+A  -& gt; Move the cursor to the beginning of the line Ctrl + C  -& gt; Abort the current process Ctrl + d  -& gt; Log off terminal session Ctrl + e  -& gt; Move the cursor to the end of the line Ctrl + k  -& gt; Delete from cursor to end of line Ctrl + L  -& gt; Clear terminal Ctrl + Z  -& gt; Suspend (send sigtstp to) the current process

The volume up key can also be used as a special key to generate a specific input

volume + e  -& gt; ESC key volume + T  -& gt; Tab volume + 1  -& gt; F1 (and volume increase + 2 → F2, etc.) volume increase + 0  -& gt; F10 volume + B  -& gt; Alt + B, use readLine to return a word volume plus + F  -& gt; Alt + F, forward a word when using readLine volume + x  -& gt; Alt + x volume + W  -& gt; Up arrow key volume + a  -& gt; Left arrow key volume + s  -& gt; Down arrow key volume + d  -& gt; Right arrow key volume + L  -& gt; | ( Pipe character) volume plus + H  -& gt; 〜( Wave character) volume plus + U  -& gt; _ ( Underline character) volume plus + P  -& gt; Previous volume plus + n  -& gt; Next page volume up +.  -& gt; CTRL + \ \ (sigquit) volume + V  -& gt; Display volume control volume plus + Q  -& gt; Show additional key view

Suggestions———————————————————————–

It is recommended that beginners do not always run as root. If you want to use root, you can

su

After the command is switched to root

exit

Return to the original identity

 
Openssh needs to be installed in termux. As we all know, Linux has two major distributions.

General Command

uname -a

You can view the kernel information of this machine. For more details, execute the following command

 cat /proc/version 

For the convenience of operation, I use SSH to connect my Android phone,

Open SSH: I’m afraid this is the most detailed one for termux to open SSH

https://blog.csdn.net/qq_ 35425070/article/details/84789078

 

When installing pyaudio, an error is reported: failed error: portaudio. H: there is no such file or directory

When installing pyaudio, an error is reported: failed error: portaudio. H: there is no such file or directory

 
The operation of pyaudio depends on the portaudio library. You should first install a portaudio library

Portaudio installation steps:

A) Download PortAudio Library http://portaudio.com/download.html , select the latest tgz, upload it to Linux or termux and place it where you want to install it. Termux: I put it in/data/data/com.termux/files/usr/share, and CD it to this directory

B) tar – zxvf file name         Unzip the downloaded files without tar, such as apt get install tar

C) enter the decompressed portaudio file and execute the following commands in turn:

    ./configure

(configure command)

This step is generally used to generate makefile to prepare for the next step of compilation. You can control the installation by adding parameters after configure. For example, the code:./configure – prefix =/usr means to install the software under/usr, and the executable file will be installed in/usr/bin (instead of the default/usr/local/bin), The resource file will be installed in/usr/share (instead of the default/usr/local/share). At the same time, some software configuration files can be set by specifying the – sys config = parameter. Some software can also add – with, – enable, – without, – disable and other parameters to control the compilation. You can view the detailed instructions and help by allowing./configure – help.

In termux, this step is set to

./configure –prefix=/data/data/com.termux/files/usr

    make     compile

    make install     Installation

4. Install pyaudio library, PIP3 install pyaudio

Fastplanner compilation error: Could not find a package configuration file provided by “cmake_modules”

Tips for the Less module cmake_modules:
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by “cmake_modules”
with any of the following names:

cmake_modulesConfig.cmake
cmake_modules-config.cmake

Add the installation prefix of “cmake_modules” to CMAKE_PREFIX_PATH or set
“cmake_modules_DIR” to a directory containing one of the above files. If
“cmake_modules” provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
Fast-Planner/uav_simulator/local_sensing/CMakeLists.txt:66 (find_package)
– Configuring incomplete, errors occurred!
See also “/home/nanorobot/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/home/nanorobot/catkin_ws/build/CMakeFiles/CMakeError.log”.
Invoking “cmake” failed

Two Methods:

        1. sudo apt-get install ros-melodic-cmake-modules(here melodic replace with your ros version)

      cmake_modules https://github.com/ros/cmake_modules

 

      1. Different ros corresponding versions.

  1. My version of ros is melodic, download the 0.4-devel version.

     

    Then it is

mkdir build 
cd build 
cmake ..
make .
sudo make install

Can’t connect to MySQL server on ‘192.168.64.132‘

Sqlog failed to connect to MySQL database in Linux system
error message: can’t connect to MySQL server on ‘192.168.64.132’

It can be connected before, but it is not enough to install the virtual machine image. According to the data, you can use SSH connection, and the configuration is as follows:

If you don’t use SSH connection, you need to use win’s telnet to test whether telnet 192.168.64.132 3306 and telnet 192.168.64.132 22 can connect 1, the virtual machine does not set IPv4 forwarding,
2, the virtual machine opens the firewall and does not expose port 3306( 22 can be connected, 3306 can not be connected).

Reference blog