Tag Archives: mac

[Solved] Web server failed to start. Port 8080 was already in use.

Problem Description:

Description:

Web server failed to start. Port 8080 was already in use.

Action:

Identify and stop the process that’s listening on port 8080 or configure this application to listen on another port.

Method 1: turn off the process occupying port 8080

    1. 1. keyboard input (Win + R), then enter “cmd” in the run dialog box, enter the command window
  1. 2. enter netstat -ano|findstr “8080”, and press Enter, as shown in the following screenshot:

3. Then enter tasklist|findstr “3516” and press enter to get the process occupying port 8080

4. Open the “task manager”, locate the change process, and then end the process. The occupation of port 8080 is cancelled

Or close with the command: taskkill -PID 3516 -F

Method 2: modify the configuration file and use other available ports

We can modify the port number in application.yml configuration file, as shown below:

View port, process and end process on Linux system

  a,Check port occupancy
    netstat -nap|grep 8080
  b,View port occupied processes
     ps -aux |grep 27672
   c,End a process
    kill -9 pid

[Solved] New MAC Unity Develop Error: error installing cocoapods

The new MAC system is 11.4, and the installed Xcode version is 13.2.1
after opening a unity project and switching to IOS platform, cocoapods is installed in the background, but an error is reported indicating that the installation fails:

ERROR: Error installing cocoapods:
       ERROR: Failed to build gem native extension.
   current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/ext/ffi_c/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Framewoks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20220311-4106-wxounc.rb extconf.rb
   mkmf.rb can't find header files for ruby at /System/Library/Framewoks/Ruby.framework/Versions/2.6/usr/lib/ruby/include/ruby.h

You might have to install separate package for the ruby development environment,ruby-dev or ruby-devel for example.

According to the error prompt and query from the network, it should be that a new Ruby Version needs to be installed, and the ruby provided by the system cannot be used
installing Ruby requires RVM, and installing RVM requires homebrew

Install homebrew

Use the command /usr/bin/Ruby - e" $(curl - fssl) is not used here https://raw.githubusercontent.com/Homebrew/install/master/install )"

After installation, execute brew update update.

Then execute brew -vto see the installed version

Install RVM

Install RVM curl -L https://get.rvm.io | bash -s stable

reload RVM environment source ~/.rvm/scripts/rvm

View RVM version RVM -v

Install Ruby

Check the known version of ruby RVM list known

check the installed version of ruby RVM list

Install a ruby version. I chose 2.6.5 RVM install 2.6.5

After installation, check the Ruby Version Ruby -v. If it is not the version just downloaded, I need to use the command to cut the version

Install cocoapods

After the above installation, execute sudo gem install cocoapods -n/usr/local/bin to install cocoapods
after the installation, execute pod --version to view the version of cocoapods

Here, for unit packaging, cocoapods are not completely installed. You need to continue to follow the following steps.

Command + Shift + G, open to the folderpop-up window, and enter ~/.cocoapods, after opening the cocoapods folder, delete all the contents under it, create a new repos folder, open the command line tool, and execute the following three commands in turn

1) cd ~/.cocoapods/repos
2) git clone --depth 1 https://github.com/CocoaPods/Specs.git master
3) pod repo update

In this way, the Xcode project exported by unity will have Xcworkspace file (in case of problems in cocoapods environment, the exported Xcode project only has .xcodeproj file, and there are many exceptions when using this file for packaging press conference), and then open the file with Xcode for subsequent publishing

[Solved] MAC Compile Error: fatal error: ‘endian.h‘ file not found

Specific error

In file included from conf.c:427:
In file included from ../include/local.h:146:
In file included from ../include/sound/asound.h:4:
../include/alsa/sound/uapi/asound.h:31:10: fatal error: 'endian.h' file not
      found
#include <endian.h>

Solution:

Change to <machine/endian.h> Just.

Others say it should be changed to <Endian.h>, Tried, it didn’t work!

[Solved] Source Zsh error: zsh problem: compinit:503: no such file or directory

zsh problem: compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew
[oh-my-zsh]  Solution:

## zsh problem: compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew

Solution:

```zsh
sudo ln -fsv /opt/homebrew/completions/zsh/_brew /usr/local/share/zsh/site-functions/_brew

brew cleanup && source ~/.zshrc
```

Then it was solved.

[Solved] Syntax Error: Error: Cannot find module ‘cache-loader‘

The following problem occurs. It should be that some dependent packages are not downloaded successfully and need to be reinstalled

Solution:
1. Enter the folder directory of the project and delete the node_ Modules file and package-lock.json file. Note that it is not package.json (if it cannot be deleted, check whether the project is open and try again after closing)
2. Enter NPM install installation dependency

3. Start the project and it can be started normally.

MAC: How to Solve VirtualBox cannot open Issues

Mac solves the problem that VirtualBox cannot open and reports an error

You must specify a machine to start, using the command line.

Solution:

Open MAC terminal
1. cd to the directory where VBox is installed
2. VBoxManage list vms lists virtual machine directories
3. VirtualBoxVM –startvm (space) + the number of the virtual machine you want to open

So you can open it

[Solved] error: cannot create �� Illegal byte sequence

Phenomenon:

Unzip a compressed package under mac(   If the folder name or file contains Chinese) Yes, the following error occurs during compressed zip archiving under Windows:

error:   cannot create �…
Illegal byte sequence

Solution::

# use ditto to replace unzip

ditto -V -x -k --sequesterRsrc --rsrc FILE_NAME.ZIP YOUR_DESTINATION

[Mac M1] How to Solve import wordcloud Error: ModuleNotFoundError: No module named ‘wordcloud‘

My computer is a MacBook Pro M1 chip, which is the most difficult computer to configure. Ah, humble MAC people can cry every time.

I downloaded the wordcloud package in Anaconda and reported errors after import. I tried all the methods found in CSDN to deal with this error again. No one is successful, all kinds of problems. Later, I found a solution on the Internet, and the address is here: https://pypi.org/project/wordcloud/

In fact, it’s very simple. If you have tried PIP install on the terminal and failed, first enter Xcode select — install to ensure that you have downloaded this. If you have downloaded it like me, there will be

Just enter this
CONDA install – C CONDA forge wordcloud
to run it. When this appears, enter y

After running in the terminal, reopen your Spyder or pycham and re import wordcloud to stop reporting errors!

How to Solve Docker Run Error: standard_init_linux.go:219: exec user process caused: exec format error

Use MAC M1 build image to run on Linux and report standard_ init_ linux.go:219: exec user process caused: exec format error

The main reason for this problem is that golang compilation cannot cross platform, that is, different systems or different CPU cores will cause this error. The golang code compiled under Linux arm cannot be run under Linux x86; Similarly, the image of a project with golang code cannot cross platform. The solution is very simple. When building, add the — platform Linux/AMD64 parameter

docker build --platform linux/amd64 -t tag .

MacTex Font Missing Error: The font “TeX Gyre Termes Math“ cannot be found.

Problem: the font “tex gyre termes math” cannot be found after the installation configuration is completed

\setmathfont{TeX Gyre Termes Math}

Software: mactex + sublime text

Cause: the Mac OS system lacks tex gyre termes math font

Solution:

1. Download font package

get into http://www.gust.org.pl/projects/e-foundry Download, find tex gyre termes math from the font bar on the left and download:

2. Install font

After decompression, there are doc and OpenType folders in the font package, and the OpenType file contains a textgyreterms-math.otf file. Double click the installation directly under the MAC system to install the system font. After successful installation, see the following figure:

For the installation process of other systems, refer to install.txt in the doc folder. After the installation is completed, it can be compiled!

tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e

When installing brew install graphviz, there was a problem with:
tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e5fedb24cb14fe4fd5c72caa96074c7b4e21ce4d2f7a89eb4b638c830f–gd-2.3.2.arm64_big_sur.bottle.tar.gz’
Error: Failure while executing; tar --extract --no-same-owner --file /Users/xxx/Library/Caches/Homebrew/downloads/348a16e5fedb24cb14fe4fd5c72caa96074c7b4e21ce4d2f7a89eb4b638c830f--gd-2.3.2.arm64_big_sur.bottle.tar.gz --directory /private/tmp/d20210927-26485-nzi2qo exited with 1. Here’s the output:
tar: Error opening archive: Failed to open ‘/Users/xxx/Library/Caches/Homebrew/downloads/348a16e5fedb24cb14fe4fd5c72caa96074c7b4e21ce4d2f7a89eb4b638c830f–gd-2.3.2.arm64_big_sur.bottle.tar.gz

A closer look reveals that there was a problem installing the dependency at this step: the

So, the solution: install the dependency brew install gd separately

Once done, just install graphviz again, and if the same type of error occurs again during this process, continue installing the dependency where the error occurred.