Tag Archives: Windows

Solving fastdfs in Windows Environment_ Client installation error, error: Microsoft Visual C + + 14.0 is required

Problem recurrence:

building ‘fdfs_ client.sendfile’ extension
error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools

Cause analysis:

You cannot PIP install FDFS directly under windows_ client_ py-1.2.6-py3.8.egg


1. First set FDFS_ client_ Py-1.2.6-py3.8.egg decompression

2. Then find FDFS_ Setup.py in the client py master directory

Comment out lines 34 and 35, as shown in the figure below:

3. Find FDFS again_ Storage under client directory_ client.py

Line 12 of note is shown in the figure:

4. Finally, find the directory where setup.py is located and execute

python setup.py install

You can find the installed FDFS in the interpreter in pycharm’s settings_ client_ py

5. Install the dependent packages mutagen and requests

pip install   mutagen

pip install   requests

Troubleshooting of nginx error under Windows: createfile() “XXX / logs / nginx. PID” failed



Under windows, when we execute nginx -s stop or Nginx -s quit  or Nginx -s reload   You may receive the following error messages:

nginx: [error] CreateFile() "D:/software/nginx/logs/nginx.pid" failed (2: The system cannot find the file specified)


When we use start Nginx   To start Nginx xxx/logs/   Generated under the directory named   Nginx.PID   The content of the file has only one number, that is, the PID corresponding to the nginx.exe process. Whether stop, quit or reload, you need to use the PID of nginx.exe to operate it. However, in some special cases (we will create a special case artificially below), Nginx.PID will be lost, so the above three commands will report an error because Nginx.PID cannot be found. Obviously, it is impossible to stop, quit or reload successfully at this time, because nginx doesn’t even know which process it corresponds to.


Simple and rough: 1) pass tasklist | findstr “nginx.exe”   Find out the PID corresponding to nginx.exe; 2) In xxx/logs/   New text file under Nginx.pid  , Write the PID of the previous step through the text editor (of course, this step can also be carried out through command line, script, hands-on programming and other methods that can achieve the purpose); 3) Execute Nginx -s stop or Nginx -s quit   Or Nginx -s reload.



In this verification, the nginx installation path is   D:/software/nginx  , The listening port is 5000.

The rendering method is a command-line screenshot. The commands used will be given in the form of text in the back, which is convenient for readers to copy and paste.

This paper only focuses on the problem of “unable to find nginx. PID”. For other problems derived from the verification process, this paper only gives the link of the answer and does not guarantee the right remedy (it does not mean that the document content is wrong, but does not guarantee that the corresponding problem can be solved). I also urge readers who know the answer to give me advice.

The commands in the verification process must be executed under the nginx installation directory, otherwise an error will occur. If you have to execute in any directory, please refer to another blog under. At the same time, remember to make corresponding changes to the relevant path.

The verification process is shown in the figure below:

Verification process

The commands used are sorted as follows:

1 start nginx
2 tasklist | findstr "nginx.exe"
3 netstat -ano | findstr "5000"   
4 type ./logs/nginx.pid
5 nginx -s quit
6 cmd /r dir /b .\\logs
7 13632 | Out-File -Encoding ASCII ./logs/nginx.pid


How to Share Files Between Linux and windows

1. Create users, directories and installation packages
yum install samba smbfs
useradd -s /sbin/nologin yunwei
smbpasswd -a yunwei
mkdir -p /date/yunwei
chmod 777 /data/yunwei
2. Configuration file
cp /etc/samba/smb.conf /etc/samba/smb.confbak
vi /etc/samba/smb.conf
comment = Home Directories
valid users = %S
browseable = No
writable = yes
create mode = 0664
directory mode = 0775

comment = yunwei
path = /data/yunwei
public = no
valid users = @yunwei
write list = yunwei
printable = no

3. Start the service
Red Hat Enterprise Linux Server release 6.4 (Santiago)
/etc/init.d/smb start
service smb reload
linux 7
systemctl start smb
systemctl status smb
4. Test the use of
windows => run =>

Solutions to problems such as failed to load the hostfxr.dll of. Net core SDK after Windows system installation

The reason is that the problem of “failed to load the hostfxr. DLL” broke out after installing the. Net core SDK on a windows2008r2 computer and then executing dotnet -- info on the command line. It has also been encountered before, but it has been solved, but no record has been made, which has caused another Google here! So write an article and record it. In addition, some 500.25 problems are also caused by this reason!

Author: Yi lezhu

Original address: https://www.cnblogs.com/yilezhu/p/10057789.html

The specific error information is as follows:

Failed to load the dll from [C:\Program

Files \ dotnet \ host \ FXR \ version number \ hostfxr. DLL], HResult: 0x80070057

The library hostfxr.dll was found, but loading it from C:\Program

Files \ dotnet \ host \ FXR \ version number \ hostfxr.dll failed

Installing .NET Core prerequisites might help resolve this problem.

http://go.microsoft.com/fwlink/?LinkID=798306&amp ; clcid=0x409

The solution is to install this patch kb2533623. It should be noted here that different system versions need to correspond to specific patches, which can be divided into 32-bit and 64 bit. You can visit this page for specific information, https://support.microsoft.com/en-us/help/2533623/microsoft-security-advisory-insecure-library-loading-could-allow-remot

This article provides the corresponding updates of Windows 7 and Windows Server 2008 R2. Please download and install them. Then execute the dotnet -- info command to see the long lost interface:

It seems that this problem only occurs in Windows 7 and Windows Server 2008 R2.

Of course, there are other situations that cause the. Net core SDK to run abnormally! Sometimes you need to install the update kb2999226. Please fill it up next time! Because I didn’t record the last time I needed to install the update kb2999226!

PIP install troubleshooting under Windows [How to Solve]


Traceback (most recent call last): File"C:\Python27\Python27\Scripts\pip-script.py", line 9, in<module> load_entry_point('pip==1.4.1','console_scripts', 'pip')() File"C:\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\__init__
 .py", line 148, in main

return command.main(args[1:], options) File"C:\Python27\Python27\lib\site-packages\pip-1.4.1-py2.7.egg\pip\basecomm
 and.py", line 169, in main
 text = '\n'.join(complete_log) UnicodeDecodeError: 'ascii' codec can't decode byte 0xb1 inposition 34: ordinal
 not in range(128)

the CMD environment of windows defaults to GBK encoding, and pip defaults to UTF-8 encoding
however, in Linux and MAC, the terminal environment defaults to UTF-8 encoding, so no error will be reported


Create a file sitecustomize.py in Python directory Python 27\lib\site-packages

import sys sys.setdefaultencoding('gbk')

Python will run this file automatically


Mysql5.7 service startup error on Windows

After installation, start the service net start mysql, which cannot be started. The log reports an error. Some system tables, mysql.user and other tables are missing


Execute under Bin: mysqld — initialize execute — user = MySQL

After execution, generate the directory C: \ program files \ MySQL \ MySQL server 5.7 \ data. Create a new root user without a password

mysqladmin  – u   root   password   123456, specify the root user password




Net start MySQL
net stop MySQL
mysqld — install, install services on windows, mysqld — remove remove remove services

Mysqld — console start printing log
mysqladmin – uroot shutdown stop service


Here is the most important thing to pay attention to. When installing MySQL service, you must switch to the bin directory of MySQL installation directory, no matter whether you configure environment variables or not, otherwise the above error will be reported when starting the service after installation

Error reported by jmap command under Windows

    Recently, I changed my laptop. In the new working environment, the jmap command is actually reporting errors, and JPS, jstat, Jinfo and jstack can be used normally. Therefore, the problem of process number is preliminarily eliminated

Attaching to core 17536 from executable heap, please wait...
Error attaching to core file: Windbg Error: OpenDumpFile failed!
sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: OpenDumpFile failed!
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach0(Native Method)
        at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach(WindbgDebuggerLocal.java:160)
        at sun.jvm.hotspot.HotSpotAgent.attachDebugger(HotSpotAgent.java:673)
        at sun.jvm.hotspot.HotSpotAgent.setupDebuggerWin32(HotSpotAgent.java:569)
        at sun.jvm.hotspot.HotSpotAgent.setupDebugger(HotSpotAgent.java:335)
        at sun.jvm.hotspot.HotSpotAgent.go(HotSpotAgent.java:304)
        at sun.jvm.hotspot.HotSpotAgent.attach(HotSpotAgent.java:156)
        at sun.jvm.hotspot.tools.Tool.start(Tool.java:191)
        at sun.jvm.hotspot.tools.Tool.execute(Tool.java:118)
        at sun.jvm.hotspot.tools.PMap.main(PMap.java:72)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at sun.tools.jmap.JMap.runTool(JMap.java:201)
        at sun.tools.jmap.JMap.main(JMap.java:130)

At the same time, I tried jmap heap XXX a non-existent process number (a pit is buried here first), but still reported the same error. According to the information of the exception stack, it is suspected that the command line under Windows does not have administrator permissions and cannot access the dump file, so I tried to run CMD as an administrator, and then jmap heap, However, the same mistake is reported:

I’m helpless now. Baidu and stackoverflow haven’t found a solution to the problem after walking around… Let’s go first

gorgeous separation line

I don’t know how long later, I suddenly remembered — “didn’t you hit the right command?” jmap – H take a look at the red box in the screenshot, and then lower your head in shame (it must be caused by eating too many mid autumn moon cakes, huh!)

as shown in the figure, jmap has three uses: 1. Connect the running process; 2. Analyze the core file, that is, dump file; 3. Connect the JVM processes of other machines. Therefore, the problem with the jmap heap XXX command above is that you forget to add “-” and jmap is regarded as analyzing the snapshot file of “heap”, and it is natural to report an error


    In JDK’s own toolkit, for commands such as JPS, jmap, jstack, etc., specifying option generally requires “-” and the following parameters do not contain bars, which should be kept in mind. And make complaints about the exception. Don’t panic. You must read the abnormal information and abnormal stack carefully. In this case, the first line has already been clear. (if you put the filename out, you can print it out better)

[Solved] Windows Django Error: A server error occurred. Please contact the administrator.

This is because the get function is used in the view function to get data that does not exist
For example, there is no data in the database with the name hello1, use the following statement to access
message = Message.objects.get(name='hello1')

will report an error message = Message.objects.get(name='boddy1')

 See the following figure:

Click the link in the box above to automatically enter line 323 of the debug.py file, and modify line 321 as shown in the figure below:

Run again:

In this case, the error message is normal, the query data does not exist

This problem does not exist in MAC and Linux, where the encoding has been set to utf8 by default.

In vmware10, centos7 mounts the shared folder of windows host, and prompts: error: cannot mount filesystem: no such device

1. Set sharing permissions

Write picture description here

2. Install VMware tools

Write picture description here

  • Click on the virtual machine
  • Click to install VMware tools
  • Copy VMwareTools-9.6.2-1688356.tar.gz in the /run/media/zhaojq/VMware\ Tools directory to the home directory
  • Generate vmware-tools-distrib after decompression
  1. [zhaojq @localhost vmware-tools-distrib] $ ls
  2. bin doc etc FILES INSTALL installer lib vmware-install.pl

Run ./vmware-install.pl

[zhaojq@localhost vmware-tools-distrib]$ ./vmware-install.pl 

Keep enter

  1. The path “” is not valid path to the gcc binary.
  2. Would you like to change it? [yes] no
  3. Enter no
  4. At The path “” IS not A! Valid path to at The 3.10 .0 – 514.26 .2.el7.x86_64 Kernel
  5. headers.
  6. Would you like to change it? [yes] no
  7. Enter no

Return after successful installation

  1. Enjoy ,
  2. – – at The VMware Team

2. Mount the shared folder of the Windows host

mnt/hgfs directory

  1. [zhaojq @localhost ~] cd /mnt/hgfs/
  2. [zhaojq @localhost hgfs] pwd
  3. /mnt/hgfs

vmware-hgfsclient command to view the current shared directory

  1. [zhaojq @localhost hgfs] $ vmware-hgfsclient
  2. E

mount error

  1. [zhaojq @localhost hgfs] $ sudo mount -t vmhgfs. host:/ E /mnt/hgfs
  2. Error : cannot mount filesystem: No such device


vmhgfs-fuse, need to install toolkit

  1. [zhaojq @localhost hgfs] $ yum install open-vm-tools-devel -y
  2. [zhaojq @localhost hgfs] $ vmhgfs-fuse. host:/ E /mnt/hgfs


3. View the mount

Note: Root privileges are required to view.

Disk E of the Windows host

Write picture description here

Mount situation under Centos virtual machine

  1. [[email protected] hgfs] # ls
  2. jashkenas-coffeescript- 1.12 . 6- 0-gf0e9837 .tar .gz LeaRun agile background development framework_6 . 3 .4 $RECYCLE .BIN System Volume Information
  3. LeaRun_6 . 3 .4 .zip node-v6 . 11 .1-linux-x64 .tar .xz redis- 3.2 . 9 .tar .gz


Mounted successfully

The Java – jar *. Jar prompt in CMD is unable to access jarfile *. Jar or windows can’t double-click to run jar file. What should I do

Front end developers must read! Starting from scratch, teach you to build a low code website platform in stages>>>

1. Switch to the directory of the target file, and then run Java – jar

2. After confirming the installation of Java virtual machine, double-click the jar file to be run or right-click the jar file, and select “open mode” → “select default program” in the pop-up menu

3. In the “open mode” setting window, click the check box before the option “always use the selected program to open this file”, and then click the “Browse” button next to it

4. Select the installation folder of Java virtual machine. If Java 7 is installed, the installation folder is generally “C:: program files?Java?Jre7?Bin” (please find the specific folder yourself). Find the javaw.exe file and click the “open” button


At this time, it has been set to use the javaw.exe application to open the jar file, but in fact, there is no response when double clicking the jar file. This is because the open file parameter is not set

Enter “regedit” in the search box of the windows start menu, right-click the file regedit found above, and select “run as administrator” in the pop-up menu

6. In the registry editor, find “HKEY”_ CLASSES_ In the file open command, add the parameter “- jar” (without quotation marks), and the modified value is similar to: “C: program files, Java: jre7, Bin: javaw. Exe” – jar% 1 “(only need to add – jar parameter, no need to modify other information). Save and exit the registry editor