Tag Archives: Mac

How to Solve nginx Install Error in Mac

Error Messages:
==> Installing dependencies for nginx: pcre
==> Installing nginx dependency: pcre
error: could not lock config file .git/config: Permission denied
Error: Command failed with exit 255: git
Solution: sudo chown -R $(whoami):admin /usr/local/* && sudo chmod -R g+rwx /usr/local/*

How to Solve Apple Mac installs Axure to open error for the first time

Axure RP 9 Chinese version for Mac cracked version (interactive product prototype design tool)

An error is reported when installing Axure on Apple Mac for the first time, as shown in the figure

I tried to uninstall and reinstall. Axure9 can’t be replaced with axure8. What should I do? Here is the solutions. Let’s have a look!

  1. Select the menu bar and go-personallyclick to enter

  1. Go to the home directory, shortcut key shiftcommand+ to >open hidden files, then find the file in this directory  .config, right-clickShow Introduction

  1. Add your currently logged-in account in Sharing and Permissions at the bottom

Verify whether it is added: Double-click the .config test after adding it. If it can be opened, the addition is successful. Note that read and write should be selected for the permissions on the right. Until you can open the config folder

  1. After opening, you will find that there is a configstore folder in it. You can’t open it by double-clicking. The steps to change the permissions are the same as before.

  1. After the configstore folder is opened, then open the Axure software

OK, it’s done

Mac: How to Solve global module install error

When NPM or cnpm is used to install the global module, an error message will be prompted:

[email protected] ~ % npm install --global nodemon
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

Solution: modify user permissions

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

Just use NPM again to install the global module

Mac: Use brew to Install MYSQL Error

question:  tar: Error opening archive: Failed to open ‘/Users/……

answer:
As shown in the picture, if you get an error when installing the six dependency, then install the six dependency package separately, brew install six.

—————
question:
.Logging to ‘/usr/local/var/mysql/leodeMacBook-Pro.local.err’.
ERROR! The server quit without updating PID file (/usr/local/var/mysql/leodeMacBook-Pro.local.pid).

MAC terminal (shell) Error: You have mail [How to Solve]

background

You have mail will be prompted when you open the built-in shell or iterm on the Mac computer. I didn’t care before, because I am engaged in network security work. I usually operate and plan tasks when studying the Mac. I did test it before, but it has been cleared manually, but why is there such a prompt?

process

The overall process should be as follows: first, the mail mechanism of MAC itself, especially the problem of planned tasks, that is, if the machine planned tasks are not executed as expected, it will report errors, The error result will be sent to the user in the form of e-mail and stored in:/var/mail/user name. This file is also true for Linux. So when you open the shell, you will be reminded that there are emails here. Because the SH script executed in the planned task was deleted when the planned task was created, but the planned task itself was not deleted, so the planned task reported an error and sent a lot of emails. At this time, the message received is: you have new mail, but after the prompt is completed, After that, the prompt becomes you have mail. Use the mail command to view the specific mail content:

From [email protected]  Mon Aug 30 11:24:01 2021
X-Original-To: hait
Delivered-To: [email protected]
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron <[email protected]> /tmp/evil.sh
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=hait>
X-Cron-Env: <USER=hait>
Date: Mon, 30 Aug 2021 11:24:00 +0800 (CST)
/bin/sh: /tmp/evil.sh: No such file or directory

Analyze the reason: it can be judged from the time that it is the email in August, which makes sense at this time. The whole process:

1. Establish the planned task and run normally;

2. Delete the SH file executed by the planned task, resulting in an error message, and then send the e-mail.

3. Delete the planned task (stop sending the error message);

4. Message unread always prompt

Solution:

1. You can directly turn off the terminal mailbox function. The link above has the command (I failed, I used plan2)

2. Delete this folder:/var/mail/user name

 

Mac opens the file and prompts that the file is damaged. Solution

Background: my colleague passed me a Navicat MySQL installation package, but it was unzipped and opened, prompting that the file was damaged. Similar as shown in the figure: (because there was no screenshot at that time, the similar figure was found on the Internet)

 

Solution

1. Open the terminal and enter the following command:

sudo spctl --master-disable

 

2. Open security and privacy to install

 

[Solved] Mac install maven Error: zsh: command not found: MVN

After installing the java development environment in Apple Mac system, you want to execute Maven related commands on the command line

The problem Zsh: command not found: MVN is found. The first reaction is that the environment variable is not configured.

Configure environment variables

vim ~/.bash_ profile

export PATH=$PATH:~/maven/bin

source .bash_ profile

Verify that the configuration is in effect

mvn -v

Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739)
Maven home: /Users/codeboyzhou/maven
Java version: 1.8.0_312, vendor: Temurin, runtime: /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "mac os x", version: "10.16", arch: "x86_64", family: "mac"

You can see that it is indeed effective in the command line, and then when you open the terminal in IDEA and continue to execute other Maven commands, the problem is reported again zsh: command not found: mvn, what’s the matter?

Guess is because the new version of Mac system uses the default zsh, and .bash_profileis the Linux system bashenvironment variables configuration, try to modify the configuration file mv .bash_profile .zshrc, and perform once again source .zshrcmake the configuration take effect, the problem is solved. Restart IDEA and the corresponding terminal window to confirm that the problem has indeed been resolved.

Other online article that is zshnot automatically loaded when you start .bash_profilecaused, can be .zshrcadded to the last line of the file source .bash_profileit automatically take effect each time the terminal starts, this method is feasible. But because my system itself does not have .zshrcthis document, other configuration information does not exist, so I use the above method directly with the environment variable to .zshrcthe next file is able to quickly solve the problem, compared to operating steps and also more concise, Which method to use can be determined according to personal preference or specific circumstances.

Mac uses graphviz package to report error failed to execute posixpath (‘dot ‘)

When using lightgbm for visualization, the graphviz package is used. The following problems are encountered when installing the graphviz package.

Error Description:

ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH

 

Error cause analysis:

At first, it was thought that the reason was that the graphviz module was not installed, so PIP install graphviz was used   Later, it was found that it still couldn’t be reinstalled after uninstalling with PIP uninstall graphviz
finally, it was found that the graphviz program needs to be installed first
to explain, after installing graphviz with PIP install graphviz, only the python calling interface of graphviz is installed. If you use graphviz, you also need to download the installation file of graphviz.

 

Solution:

You can install the graphviz package on the MAC using the following command

sudo port install graphviz

————————————————
reference:

https://blog.csdn.net/qq_32731311/article/details/115578820

https://graphviz.org/download/#mac

*

Mac installation NPM install – G @Vue/cli error [How to Solve]

An error is reported when installing NPM install – G @Vue/cli on the Mac. The version is too high. Please solve with the follow code:

sudo chown -R $(whoami) /usr/local/*

Error reason: insufficient permissions

Solution:

Open the terminal and enter sudo - s

Enter your password

Create a folder to hold items. Use the CD command to switch to the directory location