Category Archives: Error

[Solved] Git error: bad signature 0x00000000 fatal: index file corrupt

Git error : bad signature 0x00000000 fatal: index file corrupt

Problem-solving method

Question

After the computer blue screen restarts, resubmit the code prompt bad signature 0x00000000 fatal: index file corrupt

Solution:

Delete the old index file and rebuild the index file
under Windows

# Delete old index files
del .git\index
# Rebuild index file
git reset

Problem-solving

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

Recently, the IGB compiler driver found this problem:

zacha@Superman:~/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

zacha@Superman:~/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] Shell loop execute error: syntax error: bad for loop variable

#!/bin/bash

for ((i = 10 ; i>=0 ; i--))
do
	echo $i
done

Syntax error: bad for loop variable

The reason is that since Ubuntu 6.10, Ubuntu has replaced the previous default bash shell with dash shell; It shows that the/bin/sh link reverses/bin/dash instead of the traditional/bin/bash.

Question 1: why #/ Bin/bash doesn’t work?

./execution will read #/ Bin/bash specifies the shell parser, and the script needs execution permission

Executing with SH will not read #/ Bin/bash, which is equivalent to executing the/bin/sh shell script and passing it in as a parameter. The script does not need execution permission, but only reading permission

Solution 1:

Execute sudo dpkg reconfigure dash and select No

Solution 2:

Modify cycle


for i in `seq 1 10`                                                                                                
do                                                                                                               
        echo $i                                                                                                  
done                                                                                                             
         
OR
                                                                                                        
for i in {0..10}                                                                                                 
do                                                                                                               
        echo $i                                                                                                  
done  

[Solved] Error: ER_ACCESS_DENIED_ERROR: Access denied for user ‘root’@‘localhost’ (using password: YES)

Add the port number when configuring the server file

// Create the connection of database
const mysql=require('mysql')
const db=mysql.createPool({
  host:'127.0.0.1',
  port:'3307',
  user:'root',
  password:'admin123',
  database:'my_db'
})
module.exports=db

When creating a table, check the ID and increment options

[Solved] Android8.1 Compile Error: SSL error when connecting to the Jack server

An error occurs when compiling the source code of RK embedded development board
problem:

Solution:

CD/etc/java-8-openjdk/security/to this directory; sudo vim java. Security (note that it needs to be opened and modified by the root user); Delete the “tlsv1, tlsv1.1” configurations and save to exit:
restart the jack server:

cd /prebuilts/sdk/tools/ 
./jack-admin kill-server 
./jack-admin start-server 

After recompiling the source code, the problem will no longer be reported

[Solved] unesolved external symbol _imp_fprintf referenced in funciton _showerror

There are two problems when debugging projects written in ffmpeg with vs2015:

Question 1:

“LNK2019 unresolved external symbol __imp____iob_func reference in function _ShowError”

Solution: add this sentence to the source code: extern “C” {file _iob_func [3] = {* stdin, * stdout, * stderr};}

Question 2:

“unesolved external symbol _imp_fprintf referenced in funciton _showerror”

Solution: right-click the item — properties — configuration — linker — input — additional dependencies to add the library legacy_stdio_definitions.lib

[Solved] VSCode Edit LaTeX Error: Recipe terminated with error.

Recipe terminated with error encountered while editing latex in vscode Problem handling method

Question:

After texlive is installed, the command error is displayed in tex – V in the CMD file, but the version information can be displayed normally by opening tex live command line and entering tex – V. This indicates that texlive is installed successfully but the environment variables are configured incorrectly, so the error in the title appears

it is not feasible to add environment variables directly in user variables or system variables;

Solution:

After adding the above text

in the path of the system environment variable, it seems that you don’t need to restart the computer. You can display the information of Tex-V in CMD, and then restart vscode.

[Solved] redis Error: AttributeError: ‘list‘ object has no attribute ‘decode‘

An error occurred while [redis data management tool] was running!

AttributeError: ‘list’ object has no attribute ‘decode’

Solution:

1. redisutil_main.py under /www/server/panel/plugin/redisutil
2. Line 97 db=db, followed by decode_responses=True
3. Look for .decode(‘utf-8’) and delete, four out of four
4. Done!

ERROR: cannot launch node of type [amcl/amcl]: amcl

ERROR: cannot launch node of type [amcl/amcl]: amcl
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/robot/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [move_base/move_base]: move_base
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/robot/catkin_ws/src
ROS path [2]=/opt/ros/kinetic/share

 

Solution:

sudo apt-get install ros-kinetic-navigation

error C4996: ‘pcl::SAC_SAMPLE_SIZE‘ [How to Solve]

Error: pcl-1.8\pcl\sample_consensus\model_types.h(99): error C4996: ‘pcl::SAC_SAMPLE_SIZE’: This map is deprecated and is kept only to prevent breaking existing user code. Starting from PCL 1.8.0 model sample size is a protected member of the SampleConsensusModel class

Solution:
Open the project property page > C/C++ > General > SDL Check (set to No).