Tag Archives: linux

The Linux version of todesk cannot connect to the server

Problem description

Iniparser: input line too long in opt/todesk/config/todeskd.conf(1)

Can’t Parser config file: opt/todesk/config/todeskd.conf

Cause of the problem

Asked the customer service, it was the configuration file that had a problem

resolvent

Step 1. Delete configuration file

sudo   rm  / opt/todesk/config/todeskd.cfg

Step 2. Restart the service

sudo   systemctl   restart   todeskd.service

 

MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘

@[TOC] (error 2002 (HY000): can’t connect to local MySQL server through socket ‘/ TMP/MySQL. Socket’)

System overview

CentOS 7 + MySql-community-release-el6-5.noarch。

Install MySQL process

First, download the RPM installation package as follows:
WGet – P/usr/software/ http://repo.mysql.com/mysql-community-release-el-5.noarch.rpm
Then, run the following command to install the yum source:
RPM – IVH mysql-community-release-el-5. Noarch. RPM
after the yum source is installed, you can view it as follows:
ll/etc/yum. Repos. D/
if the yum source is installed correctly, It should be displayed:
total dosage 48
– rw-r – r–. 1 root 1664 November 23 2020 CentOS base. Repo
– rw-r – r–. 1 root 1309 November 23 2020 CentOS cr. repo
– rw-r – r–. 1 root 649 November 23 2020 CentOS debuginfo. Repo
– rw-r – r–. 1 root 314 November 23 2020 CentOS FastTrack. Repo
– rw-r – r–. 1 root 630 November 23 2020 Cen TOS media. Repo
– rw-r – r–. 1 root 1331 November 23 2020 CentOS sources. Repo
– rw-r – r–. 1 root 8515 November 23 2020 CentOS vault. Repo
– rw-r – r–. 1 root 616 November 23 2020 centos-x86_ Next, run the following command to install MySQL:
Yum – y install MySQL
at the end of the process, Run the following command to start MySQL service and report an error:
Service mysqld start
at this time, the error content is as shown in the question. After checking the above installation process with the following command, the packages to be installed are:
RPM – QA | grep MySQL
the packages to be seen at this time are as follows:
mysql-community-release-el6-5. Noarch
mysql-community-common-5.6.51-2. El6.x86_ 64
mysql-community-client-5.6.51-2.el6.x86_ 64
mysql-community-libs-5.6.51-2.el6.x86_ 64
you can see that there is no MySQL Server package in the above package. So next, install MySQL server with the following command:
Yum – y install MySQL server
after the above command is executed successfully, start MySQL service:
Service mysqld start
and then run:
MySQL – uroot to enter MySQL server.

How to Solve Linux error – rsyncd synchronous error 1


Linux error reporting-rsyncd sync error 1
Problem Description.
[root@pxapp1 webapps]# rsync -avz –delete /opt/tomcat/webapps/ [email protected]:tomcat-webapps
sending incremental file list
rsync: read error: Connection reset by peer (104)
rsync error: error in socket IO (code 10) at io.c(785) [sender=3.1.2]

Problem Cause.
Configuration problem

Solution.
The client needs to configure read only = no
Restart rsyncd: systemctl restart rsyncd

SLAMBook2 in ch3 code run fatal error: Eigen/Core: No such file or directory

1. First determine whether you have installed eigen3

If not, use the following command to install:

sudo apt-get install libeigen3-dev

2. The installation directory is inconsistent with the directory specified in cmakelists.txt

The default installation directory in cmakelists.txt is as follows:

modify it to the correct path

the final running success is as follows:

Solved: could not find the task ‘G + + build active file, leetcode algorithm ACM compilation and debugging

Project scenario:

Environment: Ubuntu 20.04

Tool: vscode

Because leetcode can’t debug the code (for members), it’s necessary to configure the local environment to run the code.

Leetcode’s code is to help you configure all the environments. You only need to write the core code, but you need to write all the code yourself during the interview. It’s ACM mode (Baidu ACM). At this time, if you don’t often write all the code, it’s easy to be confused (this is what happened when I was deeply convinced in the online interview)

So it’s necessary to configure the local environment and write the whole process of algorithm implementation, including the compilation process and principle of cpp file, and the debug process can make you more familiar with the code running process.

Reference for compiling environment configuration: https://code.visualstudio.com/docs/cpp/config-linux

No Baidu, no Baidu! Look at the official statement is always the best!!! If you don’t understand English, you can right-click to translate the web page directly.

My task.json configuration: it is automatically generated. The configuration of the computer and the environment is different, so this file may be different.

{
	"version": "2.0.0",
	"tasks": [
		{
			"type": "cppbuild",
			"label": "C/C++: g++ Generate activity files",
			"command": "/usr/bin/g++",
			"args": ["-g", "${file}", "-o", "${fileDirname}/${fileBasenameNoExtension}"],
			"options": {
				"cwd": "${fileDirname}"
			},
			"problemMatcher": [
				"$gcc"
			],
			"group": {
				"kind": "build",
				"isDefault": true
			},
			"detail": "Compilers: /usr/bin/g++"
		}
	]
}

My launch.json:

{
    "version": "0.2.0",
    "configurations": [
      {
        "name": "g++ build and debug active file",
        "type": "cppdbg",
        "request": "launch",
        "program": "${fileDirname}/${fileBasenameNoExtension}",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": false,
        "MIMode": "gdb",
        "setupCommands": [
          {
            "description": "Enable pretty-printing for gdb",
            "text": "-enable-pretty-printing",
            "ignoreFailures": true
          }
        ],
        "preLaunchTask": "g++ build active file",
        "miDebuggerPath": "/usr/bin/gdb"
      }
    ]
  }

Problem Description.
I encountered the following situation when configuring task.json for compiling C++ and debugging configuration file launch.json.


Cause Analysis.
Code encountered problems suggest direct google …
Reference: https://stackoverflow.com/questions/59106732/visual-studio-code-debugger-error-could-not-find-the-task-gcc-build-active-f

In your task.json file, no task is labeled as ‘gcc build active file’ which is required as a preLaunchTask in launch.json file.

So you can either change the label of task or change the content of preLaunchTask to make them match.

The answer is clear: task.json file this configuration

"label": "C/C++: g++ Generate activity files",

This configuration must be the same as launch. JSON

"preLaunchTask": "g++ build active file",

Solution:

Configure task.json as follows:

"label": "C/C++: g++ Generate activity files",

To be amended as follows:

"label": "g++ build active file",

—————————The following can be ignored———————————-

As long as the two values are the same. You can be like this: (yes, that’s what I changed it to.)

"label": "g++ build active file  hahaha",

Ubuntu: rabbitmq reports an error; Solution error: unable to connect to node rabbit@localhost : nodedown

When installing rabbitmq and executing rabbitmqctl status, the errors are as follows:

the first thing is to check the log file and form a good habit here’s my list:

root@jin:/# cd /var/log/rabbitmq/
root@jin:/var/log/rabbitmq# ls
[email protected]  [email protected]  startup_err  startup_log
# Afterwards, execute the view
cat [email protected]

As shown in the figure:

my reason is that port 5672 is occupied by other applications, so rabbitmq can’t be used. Just modify the port

Failed to download resource “expect_bottle_manifest“

When we are in brew install XXXX, we will encounter this kind of problem

curl: (22) The requested URL returned error: 404 Not Found
Warning: Bottle missing, falling back to the default domain...
==> Downloading https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.69-4

curl: (22) The requested URL returned error: 404 
Error: Failed to download resource "autoconf_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/autoconf/manifests/2.69-4

The prompt said that one of the supporting plug-ins could not be installed, which was very annoying

 
This is the time we should visit https://bintray.com/   Website, to search the version of the software you can’t download

Find the software and download it, then put it on the local computer

/In usr/local/cell/folder, and then execute brew install XXX on the terminal,  
You will find that this software is no longer needed to download