Category Archives: Error

[Solved] R Language Error: Error in RStudioGD() : Shadow graphics device error: r error 4 (R code execution error)

R Language Error: Error in RStudioGD() : Shadow graphics device error: r error 4 (R code execution error)

 

Solution:

Solution 1: Ctrl + Shift + F10 to restart your session
solution 2: run the following code directly to regenerate the temporary file without restarting (recommended)

dir.create(tempdir())

[Solved] CMake Error at CMakeLists.txt:92 (add_subdirectory)

When compiling GitHub project, you may encounter the following errors:

CMake Error at CMakeLists.txt:92 (add_subdirectory):
 The source directory
xxxxx

CMake Error at src/Runtime/CMakeLists.txt:56 (pybind11_add_module):
 Unknown CMake command "pybind11_add_module".

This is generally a lack of third-party dependencies. You can try the following command:

git submodule init && git submodule update

Reference:
https://stackoverflow.com/questions/59291154/cmake-error-at-cmakelists-txt994-add-subdirectory

How to Solve Redis Cluster Build Error

error 1

WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128
The length of the largest listening queue of each port does not meet this high-load environment and needs to be adjusted

Solution:echo 2048 > /proc/sys/net/core/somaxconn

error 2

WARNING overcommit_memory is set to 0! Background save may fail under low memory condition
Memory excess warning, setting the current memory to 0 will cause the background save to fail

Solution:
echo "vm.overcommit_memory=1" > /etc/sysctl.conf
#Refresh the configuration file to ensure it takes effect
sysctl vm.overcommit_memory=1

error 3

WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis
Enabling transparent huge page (THP) support in the kernel will cause Redis delays and memory usage issues

Solution:
echo never > /sys/kernel/mm/transparent_hugepage/enabled

error 4

Error condition on socket for SYNC: Connection reset by peer
The connection was refused because the main server may have bound its own IP address

Solution:

#Modify the master node configuration file
vim /etc/redis/6379.conf 
  bind 0.0.0.0							#Modify the listening address on line 70 to 0.0.0.0

[Solved] Keras Error: KeyError: ‘accuracy‘, KeyError: ‘val_acc‘, KeyError: ‘acc‘

Problem:
keyerror ‘ACC’ is reported when using keras

Reason:
this is a keras version problem. ACC and accuracy are intended to be the same, but different keras versions use different names, so they need to be replaced. val_ So is acc.

Solution:
Print history keyword
Print (history. History. Keys())
change the error part to the printed “K” and “V”“

[Solved] Import gensim Error: RuntimeError: Cython extensions are unavailable.

Gensim was installed successfully, but a runtimeerror occurred during import
the runtime error is as follows:
runtimeerror: Python extensions are unavailable. Without them, this gensim functionality is disabled. If you’ve installed from a package, ask the package maintainer to include Python extensions. If you’re building gensim from source yourself, run python setup. py build_ Ext — inplace and retry.
after reading other users’ articles, it is found that numpy and SciPy are incompatible with gensim

The solution steps are as follows

    1. view the python adaptation information, download the adapted numpy and SciPy WHL files, install the WHL files, download the gensim again, and run successfully.

First, check the version information of your Python adaptation before downloading the file
Open CMD and directly enter PIP debug -- verbose on the command line. The results are as follows

after finding it, go to the following link to download the adapted numpy and SciPy files

https://www.lfd.uci.edu/ ~gohlke/pythonlibs/

The corresponding downloaded file on my computer is

After downloading, enter CMD
CD to download SciPy and numpy + MKL
Python – M PIP install scipy-1.7.2-cp37-cp37m-win_ amd64.whl
python -m pip install numpy-1.21.4+mkl-cp37-cp37m-win_ amd64.whl

Then uninstall gensim and install gensim
finally, you can import

Error: Your CLT does not support macOS 11.6 [How to Solve]

After upgrading MacOS to MacOS Big Sur, we will encounter an error: your CLT does not support MacOS 11.6. When installing or updating software with brew , we just need to reinstall Xcode select
solution:
enter the following command

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install 

At this time, you will be prompted to install Xcode select. In the pop-up box, we click Install, then the agreement will pop up, and then we click agree. Then wait for the installation to complete.

[Solved] Error ‘false‘ undeclared (first use in this function)

Error: ‘false’ undeclared (first use in this function)

When you knock the code with DEVC + +, you will report an error to the following program

bool ok(int t){
	//Determine whether the tth person's job is assigned or not; if it is not assigned then a[j] = 0, otherwise a[j] = 1. 
	int i;
	for(i=0;i<t;i++)
		if(a[i]==a[t])
			return false;
		return true;
}

analysis:

There are no these keywords in real C. There is no keyword bool in C and early C + +. Bool can be used, but bool is not a built-in type. It is defined through typedef or macros. It is usually defined as int type. Later, the built-in type bool appeared in C + +, and the values can only be true (1) and false (0).

Solution 1:

Change the file type to CPP

Solution 2:

Macro definition of bool:

typedef enum __bool { false = 0, true = 1, } bool; 

[Solved] Error creating bean with name ‘sqlSessionFactory‘ defined in class path resource

Errors encountered while integrating SSM

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sqlSessionFactory’ defined in class path resource [spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: ‘class path resource [com/kuang/mapper/UserMapper.xml]’; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. The XML location is ‘class path resource [com/kuang/mapper/UserMapper.xml]’. Cause: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for com.kuang.mapper.UserMapper.selectUser. please check com/kuang/mapper/UserMapper.xml and class path resource [com/kuang/mapper/UserMapper.xml]

Reason:

Write an extra copy of this thing
Conflicts with Spring inside
Deleted and compiled successfully

[Solved] An unexpected error has occurred. Conda has prepared the above report.

When using miniconda to create a virtual environment, an error is reported:

An unexpected error has occurred. Conda has prepared the above report.

I found many methods on the Internet, all of which said:

Method 1

Execute CONDA clean — packages && conda clean –all && conda update –all

Method 2

Delete this file

C:\Users[user_name].condarc

The above method may be OK, but if it fails after trying several times, the problem may be that you have opened VPN or system agent
so the solution is: turn off VPN or disable proxy!!! Turn off VPN or disable proxy!!! Turn off VPN or disable proxy.

[Solved] Mac Install mongodb error: NonExistentPath: Data directory /data/db not found.

Error Messages:

{“t”:{“$date”:“2021-11-10T08:18:57.122+08:00”},“s”:“E”, “c”:“CONTROL”, “id”:20557, “ctx”:“initandlisten”,“msg”:“DBException in initAndListen, terminating”,“attr”:{“error”:“NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the –dbpath command line option, or (2) by adding the ‘storage.dbPath’ option in the configuration file.”}}
NonExistentPath: Data directory /data/db not found. Create the missing directory or specify another path using (1) the --dbpath command line option, or (2) by adding the 'storage.dbPath' option in the configuration file.
This error means: The /data/db directory is not found. Let us use –dbpath to specify the directory to start or add storage.dbPath to specify the directory

Use --dbpath to Startup