Tag Archives: windows

DevC++ Error: [Error] Id returned 1 exit status [How to Solve]

DEVC + + reports an error [error] ID returned 1 exit status

Cause

The computer in the school computer room always compiles twice and always reports errors

Error reporting prompt

[Error] Id returned 1 exit status

Solution

Premises

First check whether the console window of your program is closed, and then recompile if there is an error. The following scheme is for the case where an error is still reported after closing the window.

Operation

Right click dev C + + icon -> Properties – > Compatibility > Check “run this program as an administrator” open dev C + + –> tools –> compilation options –> code generation/Optimization –> connector –> set “link objective C program” to yes, and switch the compiler in the upper right corner of the dev C + + main page to debug mode (for example, tdm-gcc 4.9.2 64 bit debug) If your computer has a restore card, please place the project and its files on an unprotected disk.

[Solved] Python import Error: pip –upgrade Error: ERROR: Cannot uninstall ‘dnspython‘. It is a distutils installed

Background:
today we use package to install the module dnspython

[root@makel ~] wget http://www.dnspython.org/kits/1.9.4/dnspython-1.9.4.tar.gz
[root@makel ~] tar -xvf dnspython-1.9.4.tar.gz
[root@makel ~] cd dnspython-1.9.4/
[root@makel dnspython-1.9.4] python3 setup.py install

Solution process
1. Enter Python and import reports an error (problem found)

[root@makel ~] python3
Python 3.8.5 (default, Nov  7 2021, 21:47:38) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dns.resolver
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/python3/lib/python3.8/site-packages/dns/resolver.py", line 26, in <module>
    import dns.message
  File "/usr/local/python3/lib/python3.8/site-packages/dns/message.py", line 175
    return '<DNS message, ID ' + `self.id` + '>'
                                 ^
SyntaxError: invalid syntax

2. Try upgrading (– upgrade) and find that it still can’t be installed

[root@makel ~] pip3 install dnspython --upgrade
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: dnspython in /usr/local/python3/lib/python3.8/site-packages (1.9.4)
Collecting dnspython
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/f5/2d/ae9e172b4e5e72fa4b3cfc2517f38b602cc9ba31355f9669c502b4e9c458/dnspython-2.1.0-py3-none-any.whl (241 kB)
     |████████████████████████████████| 241 kB 898 kB/s            
Installing collected packages: dnspython
  Attempting uninstall: dnspython
    Found existing installation: dnspython 1.9.4
ERROR: Cannot uninstall 'dnspython'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

3. A new error occurred while attempting to uninstall

[root@makel ~] pip3 uninstall dnspython
Found existing installation: dnspython 1.9.4
ERROR: Cannot uninstall 'dnspython'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.

4. If the command cannot be unloaded, delete the file manually

[root@makel ~] cd /usr/local/python3  #Go to the directory where python is installed
[root@makel python3] find ./-name "*package*" #Fuzzy search package
./lib/python3.8/site-packages
./lib/python3.8/site-packages/setuptools/package_index.py
./lib/python3.8/site-packages/setuptools/__pycache__/package_index.cpython-38.pyc
./lib/python3.8/site-packages/setuptools/__pycache__/package_index.cpython-38.opt-1.pyc
......
[root@makel python3] cd lib/python3.8/site-packages/ #Find site-packages from the above results and go to this directory
[root@makel site-packages] ll  
total 96
drwxr-xr-x. 4 root root  4096 Nov 16 17:18 dns
-rw-r--r--. 1 root root  1277 Nov  9 22:31 dnspython-1.9.4-py3.8.egg-info
....
[root@makel site-packages] rm -rf dnspython-1.9.4-py3.8.egg-info   #Delete all files containing the module name

5. Reinstall and import successfully after installation

[root@makel site-packages] pip3 install dnspython #reinstall
[root@makel site-packages] python3
Python 3.8.5 (default, Nov  7 2021, 21:47:38) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import dns.resolver
>>> exit

[Solved] Git Clone Error: The TLS connection was non-properly terminated.

Operating system: Ubuntu 18.04

Test time: November 18, 2021

Problem Description:

Recently, the author encountered the following problems when downloading the repository on GitHub by using the GIT clone command, resulting in cloning failure

$ git clone https://github.com/pjreddie/darknet
Clone to 'darknet'...
fatal: unable to access 'https://github.com/pjreddie/darknet/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

Solution:

Modify the HTTPS of the warehouse connection to git to clone

$ git clone https://github.com/pjreddie/darknet

Error in configuring Hadoop 3.1.3: attempting to operate on yarn nodemanager as root error

This may occur when HDFS and yarn services are turned on, and when HDFS and yarn services are turned off using scripts, the

solution may also occur

Add the following parameters to the top of start-dfs.sh and stop-dfs.sh (in SBIN of Hadoop installation directory)

HDFS_DATANODE_USER=root
HADOOP_SECURE_DN_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root

Add the following parameters to the top of start-yarn.sh and stop-yarn.sh (in SBIN of Hadoop installation directory)

YARN_RESOURCEMANAGER_USER=root
HADOOP_SECURE_DN_USER=yarn
YARN_NODEMANAGER_USER=root

Successfully solved the problem

Python: How to Solve multiprocessing module Error in Windows

[problem description]

The following code can run normally in Linux, but an error is reported in windows.

import multiprocessing

def fun():  # Child process function
     print("child process execution")

p = multiprocessing .Process(target=fun) # Create process object

p.start() # Start the process

p.join() # Recycle process


[solution]

Add code as prompted:

if __name__ == '__main__':
    multiprocessing.freeze_support()

Adding only the above code will still report an error (the same error).

The code for creating process objects, starting processes, and recycling processes should also be placed in __ main__ protection

import multiprocessing

def fun():  # Child process function
     print("child process execution")

if __name__ =='__main__':
     multiprocessing.freeze_support() # Doesn't seem to be added?

     p = multiprocessing.Process(target=fun) # Create process object

     p.start() # Start the process

     p.join() # Recycle process

Done.

[Solved] Windows Configurate Python Environment error: Microsoft Visual C++ 14.0 or greater is required. Get it with “Microsoft

Problem description

An error occurs when configuring and installing pycotools package in Anaconda environment under Windows 10:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft

Solution

The main reason is that my windows 10 lacks some environments and dependencies that require C + + compilation when installing Python packages, so it needs to be downloaded and installed.

Open the link and click the download generation tool:

you will download a tool called vs_ buildtools__ 396764696.1636620081.exe , double-click the executable to download and install the library. Note that the following components are selected during the download process:

after the download and installation is completed, it takes effect after restarting the computer.

This completes the installation of environment dependencies such as C + +.

End.

[reference]
1 https://docs.microsoft.com/en-us/answers/questions/136595/error-microsoft-visual-c-140-or-greater-is-require.html

[Solved] Linux — 9 — txt files are copied from windows to Linux and read error

Reason: different coding methods

Solution:

Modify the CFG configuration file in Linux, create a new CFG text file, copy and paste it into the new CFG. File file name to view the encoding method of the file.

How to convert in Linux?

Convert CFG files in folders 1 and 2 [UTF-8 (with BOM) to UTF-8]:

#!/bin/bash

function cfg_change()
{
	dir=./etc/xxx/"$1"/
	find $dir -type f -name "cfg.txt" -print | xargs -i sed -i '1 s/^\xef\xbb\xbf//' {}
	echo "-------Convert Succeed-------"
	file ./etc/xxx/"$1"/cfg.txt
}

case "$1" in
	-1)
		cfg_change 1;
    ;;
	-2)
		cfg_change 2;
	;;
	*)
		echo "Usage: $0 -1|-2"
esac

exit 0

Error reported when Windows builds docker image: failed to create LLB definition: 403 Forbidden

preface

Use the docker build command to build a mirror: “failed to solve with frontend dockerfile. V0: failed to create LLB definition: unexpected status code [manifests 18.04]: 403 Forbidden”. The specific screenshot of the error is as follows:

resolvent

It happens during the build process. It is an error in the buildkit, considering that the buildkit is still unstable. If you use the docker desktop on MAC/windows, you may also have to disable it in the “docker engine” JSON configuration
docker desktop – & gt; Settings – & gt; Docker engine – & gt; “Features”: {buildkit: true} will “features”: {buildkit: false}

Note that this is not a fix, it is a solution until someone in the docker team implements the correct fix. Please try again when the buildkit is more stable

Reference articles

github issues

Win10 Start Linux error: Error: 0x800701bc WSL 2 [How to Solve]

Error: 0x800701bc WSL 2

Manual installation of wsl

Step 1 - Enable the Windows subsystem for Linux
Step 2 - Check the requirements to run WSL 2
Step 3 - Enable the virtual machine feature
Step 4 - Download the Linux kernel update package
Step 5 - Set WSL 2 as the default version
Step 6 - Install the selected Linux distribution

Win10 system [createfile() error: 5] problem solving

When you press the shitf key on the keyboard, and then click the right mouse button to open the PowerShell window, the following error pops up:

createfile() error: 5 is a permission problem in the win10 system. To solve this problem, you need to close the relevant permissions in the registry. The specific operations are as follows:
(1) press the win + R shortcut key on the keyboard, open it and enter the command: regedit, See the following figure for details

(2) Then click OK to open the registry: regedit and find the following option HKEY_ LOCAL_ Machine \ software \ Microsoft \ windows \ CurrentVersion \ policies \ system, modify the key value under the path: enablelua, and change 1 to 0 to solve the problem

How to Fix the printer error 0x00000709 on Windows

If there is a name problem with the printer, please check the printer name and the error number is 0x00000709. If there is this problem, the solution is as follows. Look down:

Step 1: first, open the control panel to find the user account, click open to find the credential manager, find the management windows credentials in the credential manager, click open, select the windows credentials after clicking, and then add the windows credentials. Then fill in according to the prompt. The first line writes the IP address of the printer, and the second line writes the user name of the computer login, The third line is to fill in the password of the computer user. If you don’t have a password, you don’t have to fill in it. After filling in it, click OK,

You think this is OK. How is it possible?It’s not that simple. The first step is above, and the second step is next. Another problem. After the first step is completed, you will be prompted when you add a printer. Windows cannot connect to the printer, and the error number is 0x0000007c. Next, look down:

Step 2: still open the control panel, find the program, and you will see an uninstall program. Click on it to find and view the installed updates. Click on it, and you will see the program in the following picture. Right-click to uninstall the program. Several uninstall only the programs beginning with KB500 in brackets, and then restart the computer to add a printer Do you think it’s very simple? If you only complete the first step, it can’t be solved. The solution to the problem of printer name is to turn one problem into another,

Error in installing canal server for windows

    startup error

    solution: edit the startup.bat file, delete @rem, modify, and restart. Whether the startup is successful or not can be checked. An error occurred in/log/example/example.log, and canal cannot connect to the database
    solution: modify the canal user password in MySQL

    update user set password = PASSWORD('Canal_2020') where user = 'canal';