Category Archives: Linux

error: stray ‘\343’ in program [How to Solve]

Problem phenomenon:

Cause of problem:

This error is basically generated by copying the code from the web page and compiling it. Because the copied code contains Chinese spaces and characters, it can’t be distinguished by the naked eye.

Solution:

1. When the amount of code is small, it is best to re type it at the error location, then save it and recompile it.

Error prompts the location information of the error. Find the corresponding place to change.

2. It can also be used when there are many codes, or the replacement function of GEDIT can be used to replace with standard spaces, which is more labor-saving.

Find characters in error:

Under Linux, you can:

cat xxx.c -A

Chinese will be displayed as characters with red lines.

[Solved] git error: unable to create file Filename too long

$ git checkout -b Dev_Br20211217 origin/Dev_Br20211217
error: unable to create file shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/TestAlibabaDubboAnnotationApplication.java: Filename too long
error: unable to create file shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java: Filename too long
error: unable to create file shenyu-examples/shenyu-examples-dubbo/shenyu-examples-alibaba-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/alibaba/dubbo/service/annotation/impl/DubboTestServiceImpl.java: Filename too long
error: unable to create file shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/apache/dubbo/service/annotation/TestApacheDubboAnnotationApplication.java: Filenametoo long
error: unable to create file shenyu-examples/shenyu-examples-dubbo/shenyu-examples-apache-dubbo-service-annotation/src/main/java/org/apache/shenyu/examples/apache/dubbo/service/annotation/impl/DubboMultiParamServiceImpl.java: Filename too long

Solution:
git config --global core.longpaths true

[Solved] error: this statement may fall through [-Werror=implicit-fallthrough=]

/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:681:5: note: here
     case 'e':
     ^~~~
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:686:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
       out.setf(std::ios::uppercase);
       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:687:5: note: here
     case 'f':
     ^~~~
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:691:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
       out.setf(std::ios::uppercase);
       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:692:5: note: here
     case 'g':
     ^~~~
In file included from /home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/printf.h:76:0,
                 from /home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/platform/enforce.h:40,
                 from /home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/framework/threadpool.h:25,
                 from /home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/framework/threadpool.cc:15:
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h: In function ‘const char* paddle::string::tinyformat::detail::streamStateFromFormat(std::ostream&, bool&, int&, const char*, const paddle::string::tinyformat::detail::FormatArg*, int&, int)’:
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:673:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
       out.setf(std::ios::uppercase);
       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:674:5: note: here
     case 'x':
     ^~~~
/home/liuc/git/AnyQ/build/third_party/paddle/src/extern_paddle/paddle/fluid/string/tinyformat/tinyformat.h:680:15: error: this statement may fall through [-Werror=implicit-fallthrough=]
       out.setf(std::ios::uppercase);
       ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~

 

Solution:

Add the following line in the CMakeList.txt file:
set(CMAKE_CXX_FLAGS “-Wno-implicit-fallthroughs”)

[Solved] ERROR: Command errored out with exit status 128: git clone -q

This error occurred when installing git + GitHub web page. The full name is

Collecting git+https://github.com/pytorch/tnt.git@master
  Cloning https://github.com/pytorch/tnt.git (to revision master) to c:\users\lee\appdata\local\temp\pip-req-build-lbtbze6v
  Running command git clone -q https://github.com/pytorch/tnt.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-lbtbze6v'
  fatal: unable to access 'https://github.com/pytorch/tnt.git/': OpenSSL SSL_read: Connection was reset, errno 10054
WARNING: Discarding git+https://github.com/pytorch/tnt.git@master. Command errored out with exit status 128: git clone -q https://github.com/pytorch/tnt.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-lbtbze6v' Check the logs for fu
ll command output.
ERROR: Command errored out with exit status 128: git clone -q https://github.com/pytorch/tnt.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-lbtbze6v' Check the logs for full command output.

Solution:

 pip install git+git://github.com/ildoonet/pytorch-gradual-warmup-lr.git

Successfully installed

Collecting git+git://github.com/ildoonet/pytorch-gradual-warmup-lr.git
  Cloning git://github.com/ildoonet/pytorch-gradual-warmup-lr.git to c:\users\lee\appdata\local\temp\pip-req-build-ncz3svwe
  Running command git clone -q git://github.com/ildoonet/pytorch-gradual-warmup-lr.git 'C:\Users\lee\AppData\Local\Temp\pip-req-build-ncz3svwe'
  Resolved git://github.com/ildoonet/pytorch-gradual-warmup-lr.git to commit 6b5e8953a80aef5b324104dc0c2e9b8c34d622bd
Building wheels for collected packages: warmup-scheduler
  Building wheel for warmup-scheduler (setup.py) ... done
  Created wheel for warmup-scheduler: filename=warmup_scheduler-0.3.2-py3-none-any.whl size=3917 sha256=4cef133c28685f1e5a70364fd6546a3d4d995fe49584781b1024d3707f9f222f
  Stored in directory: C:\Users\lee\AppData\Local\Temp\pip-ephem-wheel-cache-m6_t0cfl\wheels\d2\57\4d\3adb5d109151933485f2b4387f61a90ff8e669f50fc8f1fa14
Successfully built warmup-scheduler
Installing collected packages: warmup-scheduler
Successfully installed warmup-scheduler-0.3.2

[Solved] org.thymeleaf.exceptions.TemplateInputException: Error resolving template

This problem occurs when spring boot} integrates thymeleaf

By querying other people’s blogs. I understand that there are several possible errors

1 when the method corresponding to your controller layer returns the HTML path and name, add an additional /.

For example, return “/index”. If this ‘/’ causes an error, the solution is to remove the ‘/’ in front of the return, such as return “/index”

2. Introduction package problem (I solved it this way)

Add dependency in porn

<dependency> 
<groupId>net.sourceforge.nekohtml</groupId> 
<artifactId>nekohtml</artifactId> 
<version>1.9.22</version> 
</dependency>

[Solved] Raspberry Pi Error: VNC error “No configured security type is supported by 3.3 VNC Viewer“

Raspberry Pi Error: VNC error “No configured security type is supported by 3.3 VNC Viewer”

# Command Line Configuration Startup
sudo raspi-config 

Enter interface options

there are VNC options inside. Enter enable

Step 2: modify VNC configuration (Note: the following command lines are executed)

# Note: Here the first step of the change password command line is also executed, change the password to the same password as your original start on the line
# Do not ask why, just change it
$ sudo passwd
passwd: password updated successfully
$ su root
$ sudo echo 'Authentication=VncAuth' >> /root/.vnc/config.d/vncserver-x11
$ sudo vncpasswd -service
# Execute here to enter the password (occasionally you have to wait a few seconds), here is to set the password to log in to VNC
Successfully set "Password" VNC parameter in /root/.vnc/config.d/vncserver-x11
$ sudo cat /root/.vnc/config.d/vncserver-x11
_AnlLastConnTime=int64:0000000000000000
_LastUpdateCheckSuccessTime=int64:01d7d31e1f95ea36
_LastUpdateCheckTime=int64:01d7d31e1f95ea36
Authentication=VncAuth
Password=c3abbea3b003a0b231737c0541892d72

Start VNC/mobaxterm again to connect normally

[Solved] minio Failed to Upload File Error: The difference between the request time and the server‘s time is too large.

Problem Description:

Minio upload failed. The background controller reports an error. The error information is as follows:

The difference between the request time and the server's time is too large.

Cause analysis:

The system time zone is inconsistent with the hardware time zone

Solution:

Note: when uploading files, you need to adjust the time of Linux server to be consistent with that of windows!

Step 1: install NTP service

yum -y install ntp


Step 2: start the startup service

systemctl enable ntp


Step 3: start the service

systemctl start ntpq


Step 4: change the time zone

timedatectl set-timezone Asia/Shanghai


Step 5: enable NTP synchronization

timedatectl set-ntp yes


Step 6: synchronize time

ntpq -p

Finally, you can try to enter the command} on the console to check whether it is consistent with the windows system time

date

[Solved] Linux Kernel Compile Error: make menuconfig‘ requires the ncurses libraries

report errors

*** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 *** 
 *** Install ncurses (ncurses-devel) and try again.
 *** 
make[1]: *** [scripts/kconfig/Makefile:202: scripts/kconfig/dochecklxdialog] Error 1
make: *** [Makefile:520: menuconfig] Error 2

Solution:
sudo apt-get install libncurses5-dev

[Solved] ubuntu makefile Cross-compilation error: file not recognized: file format not recognized

When compiling netkit-ftp on linux ubuntu an error is reported: file not recognized: file format not recognized

[root@ubuntu /arnold_test/20211219_ftpCrossCompile/netkit-ftp-0.17]24# make
(cd  ftp && make)
make[1]: Entering directory '/arnold_test/20211219_ftpCrossCompile/netkit-ftp-0.17/ftp'
arm-linux-gnueabihf-gcc -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline  glob.c -c
arm-linux-gnueabihf-gcc -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline  main.c -c
arm-linux-gnueabihf-gcc -O2 -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline  ruserpass.c -c
arm-linux-gnueabihf-gcc  cmds.o cmdtab.o domacro.o ftp.o glob.o main.o ruserpass.o  -o ftp
cmds.o: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
Makefile:14: recipe for target 'ftp' failed
make[1]: *** [ftp] Error 1
make[1]: Leaving directory '/arnold_test/20211219_ftpCrossCompile/netkit-ftp-0.17/ftp'
Makefile:7: recipe for target 'ftp.build' failed
make: *** [ftp.build] Error 2

Solution: make clean

Or manually delete the files generated by the previous compilation