Tag Archives: other

[Solved] This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/@babel

[Error] This dependency was not found: * core-js/modules/es.error.cause. js in ./node_ modules/@babel/runtime

Solution: Delete the node_modules folder directly in the project folder, then install core-js in the terminal

npm install --save core-js

After installation, continue to run the following command

npm install

Start project:

npm run dev

The project is ready to run

Uncaught URIError: URI malformed [How to Solve]

Uncaught URIError: URI malformed

  • url, pass the value, if the key has Chinese characters inside, the browser will be encoded off by default, so this page needs to be decoded first when calling the query interface), the above error occurs.
  • Because the url contains the “%” character, the browser will give an error when it executes decodeURIComponent on “%”.

Repeat the problem

The browser url on the splice on (?q=%好的);

https://www.baidu.com/?q=%好的

Enter the code;

location.search
'?q=%%E5%A5%BD%E7%9A%84'
decodeURIComponent('%%E5%A5%BD%E7%9A%84');

Solution

urlStr.replace(/%/g, '%25');

Fundamentally solve the problem: encode the URL before uploading the value

encodeURIComponent('%好的');
'%25%E5%A5%BD%E7%9A%84'
https://www.baidu.com/?q=%25%E5%A5%BD%E7%9A%84

[Solved] Overleaf Compile the Paper Error: LaText Error:Environment aligned undefined.

 

Problem Description:

Use online overflow to compile the paper, and the errors in the formula part are as follows.

Problem solving:

This “environment XXX undefined” problem is mostly caused by the fact that packages are not introduced. The solution is to introduce corresponding packages

The solution to this error is to import the amspath package, that is, add this line where the package was imported first.

\usepackage{amsmath}

[Solved] github Error: ERROR: You‘re using an RSA key with SHA-1

github Error: ERROR: You're using an RSA key with SHA-1,RSA can not used and need to upgrade:

ERROR: You're using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

Solution:

# Generate a new secret key, if you report an error unknown key type ed25519, use this: ssh-keygen -t ecdsa -b 521 -C "[email protected]", all the way back to the car (the first carriage return is the name of the generated secret key, do not give the default, the last two are the password, you can do without)
$ ssh-keygen -t ed25519 -C "[email protected]"

# start ssh proxy, use different commands depending on the environment
$ eval "$(ssh-agent -s)"

# Add the secret key to the agent, and if there are other previous secret keys, add them too
$ ssh-add id_ecdsa

# View the secret key and copy and paste it to GitHub
$ cat ~/.ssh/id_ecdsa

# Test, it's best to pull a project to see if it can be accessed
$ ssh -T [email protected]

log

(pytorch) [[email protected] Temp]$ git pull
ERROR: You are using an RSA key with SHA-1, which is no longer allowed. Please use a newer client or a different key type.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
# 生成秘钥
(pytorch) [[email protected] .ssh]$ ssh-keygen -t ecdsa -b 521 -C "[email protected]163.com"
Generating public/private ecdsa key pair.
Enter file in which to save the key (/public/home/yudong/.ssh/id_ecdsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /public/home/yudong/.ssh/id_ecdsa.
Your public key has been saved in /public/home/yudong/.ssh/id_ecdsa.pub.
The key fingerprint is:
7a:3b:30:d8:b5:a3:5d:c7:85:8b:82:b6:75:2a:d8:fc [email protected]
The key's randomart image is:
+--[ECDSA  521]---+
|                 |
|                 |
|             .   |
|        .   . .  |
|     o oS. o o   |
|    . *.= + +    |
|     =.B.* .     |
|    . *.+.       |
|       oE.       |
+-----------------+
(pytorch) [[email protected] .ssh]$ ls
authorized_keys  config  id_ecdsa  id_ecdsa.pub  id_rsa  id_rsa.pub  known_hosts
# start shh proxy
(pytorch) [[email protected] .ssh]$ eval "$(ssh-agent -s)"
Agent pid 210477
# add proxy
(pytorch) [[email protected] .ssh]$ ssh-add id_ecdsa
Identity added: id_ecdsa (id_ecdsa)
(pytorch) [[email protected] .ssh]$ ssh-add id_rsa
Identity added: id_rsa (id_rsa)
# check the public key
(pytorch) [[email protected] .ssh]$ cat id_ecdsa.pub 
ecdsa-sha2-nistp521 AAAAE2VjZHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXkfa6XXXqOS62um3j8ZOXVdabpGwCRCVBLlxMNfmNPRNG2FEl3rkxpw2O91MAINv+JiXPU56sA== [email protected]
# test
(pytorch) [[email protected] .ssh]$ ssh -T [email protected]
Hi ydduong! You have successfully authenticated, but GitHub does not provide shell access.
(pytorch) [[email protected] .ssh]$ cd ../Temp/
# test
(pytorch) [[email protected] Temp]$ git pull
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 3), reused 6 (delta 3), pack-reused 0
Unpacking objects: 100% (6/6), done.
From github.com:ydduong/Temp
   5e7379d..aec2a53  main       -> origin/main
Updating 5e7379d..aec2a53
Fast-forward
 Snipaste_2022-03-25_23-26-58.png | Bin 0 -> 238594 bytes
 plt.py                           |  65 +++++++++++++++++++++++++++++++++++++++++++++++++----------------
 2 files changed, 49 insertions(+), 16 deletions(-)
 create mode 100644 Snipaste_2022-03-25_23-26-58.png
(pytorch) [[email protected] Temp]$ 

Linux Use dtc generate dtb Error: “FATAL ERROR: Unable to parse input tree“

Error: 
linux-5.10>$ dtc -I dts -O dtb arch/arm64/boot/dts/freescale/fsl-ls1046a-rdb.dts -o fsl-ls1046a-rdb.dtb
Error: fsl-ls1046a-rdb.dts:13.1-9 syntax error
FATAL ERROR: Unable to parse input tree

Solution:
linux-5.10>$ export ARCH=arm64
linux-5.10>$ export CROSS_COMPILE=aarch64-linux-gnu-
linux-5.10>$ make defconfig
linux-5.10>$ make dtbs or
linux-5.10>$ make freescale/fsl-ls1046a-rdb.dtb

IDEA Compile Error: java Compilation failed internal java compiler error

idea compilation failed, reporting java: Compilation failed: internal java compiler error
Check if the local jdk version is exactly the same

    File ->Project Structure->Project Settings ->Project->Project SDKFile ->Project Structure->Project Settings->Modules->Project->Language levelFile ->Project Structure->Platform->SDKs->JDK home pathSettings->Build,Execution,Deployment->Java Compiler->Per-module butecode version

[Solved] igb Compile Error: igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’

Recently, the IGB compiler driver found this problem:

[email protected]:~/igb/igb-5.7.2/src$ make
#@+ echo "*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but" ; echo "*** the signing key cannot be found. Module signing has been" ; echo "*** disabled for this build." ; make  ccflags-y="" -C "/lib/modules/4.15.0-142-generic/build" CONFIG_IGB=m CONFIG_MODULE_SIG=n CONFIG_MODULE_SIG_ALL= M="/home/zacha/igb/igb-5.7.2/src"   modules  
make -C /home/zacha/yulong810/kernel M=/home/zacha/igb/igb-5.7.2/src CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm
make[1]: Entering directory '/home/zacha/yulong810/kernel'
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_main.o
/home/zacha/igb/igb-5.7.2/src/igb_main.c: In function ‘igb_get_os_driver_version’:
/home/zacha/igb/igb-5.7.2/src/igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’ [-Werror=implicit-function-declaration]
   if(!isdigit(*c) && *c != '.')
       ^~~~~~~
cc1: some warnings being treated as errors
scripts/Makefile.build:303: recipe for target '/home/zacha/igb/igb-5.7.2/src/igb_main.o' failed
make[2]: *** [/home/zacha/igb/igb-5.7.2/src/igb_main.o] Error 1
Makefile:1519: recipe for target '_module_/home/zacha/igb/igb-5.7.2/src' failed
make[1]: *** [_module_/home/zacha/igb/igb-5.7.2/src] Error 2
make[1]: Leaving directory '/home/zacha/yulong810/kernel'
Makefile:88: recipe for target 'default' failed
make: *** [default] Error 2

There are also solutions online:
https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/3

Solution:

Add #include <linux/ctype.h> inigb)main.c
then compile and generate IGB.ko

[email protected]:~/igb/igb-5.7.2/src$ make
#@+ echo "*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but" ; echo "*** the signing key cannot be found. Module signing has been" ; echo "*** disabled for this build." ; make  ccflags-y="" -C "/lib/modules/4.15.0-142-generic/build" CONFIG_IGB=m CONFIG_MODULE_SIG=n CONFIG_MODULE_SIG_ALL= M="/home/zacha/igb/igb-5.7.2/src"   modules  
make -C /home/zacha/yulong810/kernel M=/home/zacha/igb/igb-5.7.2/src CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm
make[1]: Entering directory '/home/zacha/yulong810/kernel'
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_main.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_api.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_ethtool.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_hwmon.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_mbx.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_mac.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_manage.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_nvm.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_param.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_phy.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_procfs.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_vmdq.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_82575.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/e1000_i210.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_debugfs.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/igb_ptp.o
  CC [M]  /home/zacha/igb/igb-5.7.2/src/kcompat.o
  LD [M]  /home/zacha/igb/igb-5.7.2/src/igb.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/zacha/igb/igb-5.7.2/src/igb.mod.o
  LD [M]  /home/zacha/igb/igb-5.7.2/src/igb.ko
make[1]: Leaving directory '/home/zacha/yulong810/kernel'

[Solved] mongodb Startup Error: ERROR: child process failed, exited with error number 14

Mongodb used to work well before. Today, it suddenly started to report an error. According to the Internet, the possible reasons are:

1. failed to start when service mongodb restart
2. caused by not shutting down mongodb properly, such as direct kill -9 <pid> causes
3. locked by multiple threads when inserting data [may be too much data, space capacity is insufficient].

My solution:

Delete the mongod.lock file under dbpath, then delete all log files under logpath, and finally execute reboot to restart the server side.

[Solved] Pylink Windows Chinese path error: Specified file could not be opened

Solution:

Modify the jlink.py file under the pylink package path and find the flash_file method;

Find the self._dll.JLINK_DownloadFile line under this method, and modify the following parameter path.encode() to

path.encode(locale.getpreferredencoding()), Of course, you have to use the locale preamble package