Tag Archives: Mac

Mac: How to Solve Print: Entry, “:CFBundleIdentifier”, Does Not Exist

Changing react versions online using.

“react”: “16.0.0-alpha.6”,
“react-native”: “0.44.3”

It does compile, but it doesn’t work with the new version

The real reason is: boost is not compiled correctly, the solution.

I. Uninstall the original boost.

1, delete the file

sudo rm –rf /usr/local/include/boost

sudo rm –rf /usr/local/lib/libboost_*

2. uninstall boost

brew uninstall boost

2.Download boost version

1.Check the version /node_modules/react-native/third-party in the project

2.download https://ncu.dl.sourceforge.net/project/boost/boost/1.63.0/boost_1_63_0.tar.gz

3.replace boost_1_63_0.tar.gz in .rncache

3. install boost

1.unpackage boost_1_63_0.tar.gz

2. install boost

cdboost_1_63_0

./booststrap.sh

sudo ./b2 install

4. Creation of the project

1.react-native init XXX

2.cd XXX

3.react-native run-ios

Error

4. After executing once: react-native run-ios appears

At this point in the cache copy boost from the

5、If not, copy the compiled /opt/local/include/boost to /node_modules/react-native/third-party/boost_1_63_0

success

react version

Done!

Mac remote service repair: warning: remote host identification has changed!

Today, when using git to operate remote service, prompt the remote host to identify the modification

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:----------------------------------.
Please contact your system administrator.
Add correct host key in /Users/dyz/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/dyz/.ssh/known_hosts:1
ECDSA host key for gitlab.baidu.com has changed and you have requested strict checking.
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The reason is that the system of Alibaba cloud host was reinstalled yesterday, which caused the remote host information stored in this machine to change. According to the above prompt, enter/users/dyz /. SSH, edit and open known_ Hosts file. I have only connected to one remote host here, so I delete all the contents in it. After saving, I will link to the remote host again by git operation

Are you sure you want to continue connecting (yes/no)?

Enter yes

Mac prompt operation not permitted solution

This article gives you a comprehensive understanding of Java object serialization and deserialization>>>

Some operations on MAC need system permission. When you enter the correct password, you can set the command: sudo Chmod – R 777 needs to modify the path of the upper directory of the file

However, except in some cases, such as moving sudo to the/usr/bin directory or sudo PIP update, it will still fail and prompt operation not permitted

Reason: SIP (system integrity protection) is enabled in MAC, and rootless mechanism is added. As a result, the file cannot be modified even under the root permission, so the protection mechanism can only be modified after it is closed

1) Restart the computer. When the apple logo appears on the screen, follow Command + R until you enter the protection mode

2) Protection mode: a dialog box in the middle of the screen prompts to restore a backup, or restore the factory system, etc. There is a row of toolbars in the upper left corner

3) Find the terminal terminal in the upper left corner, open it, and enter csrutil disable

4) Restart the computer again to modify the files in the usr/bin directory

PS: if you want to restore the protection mechanism and re-enter the protection mode, enter csrutil enable in the same way

Solution – bash: RVM: command not found prompt, install RVM offline in MAC environment

This article gives you a comprehensive understanding of Java object serialization and deserialization>>>

Download RVM in GitHub

The download address is

git clone https://github.com/rvm/rvm.git

As shown in the figure above, after downloading, double-click to open /bin/RVM instaler

As shown in the figure above, it is proved that RVM is installed, but the environment variables need to be configured to make the RVM command take effect. Execute the following command:

kinglyimac@192 ~ % vi ~/.bash_profile
kinglyimac@192 ~ % source ~/.rvm/scripts/rvm

Use RVM - V to view the version. The following indicates that the installation is complete

kinglyimac@192 ~ % rvm -v
rvm 1.29.10-next (master) by Michal Papis, Piotr Kuczynski, Wayne E. Seguin [https://rvm.io]
kinglyimac@192 ~ % 

Mac Upgrade Catalina(10.15.6) Error: svnThe subversion command line tools are no longer provided by Xcode.

The MacOS is updated to the new version. When executing SVN related command line operations, the following errors appear:

The subversion command line tools are no longer provided by Xcode.

Online search, most of the answers are yes

Solution:
sudo rm -rf /Library/Developer/CommandLineTools

xcode-select --install

found invalid after operation:

Then we see: http://zerocorner.com/index/index/detail/id/54.html

The content described is basically the same. According to the idea, the brew is reloaded and the domestic image library is switched https://blog.csdn.net/wueasy/article/details/105304818 )

Download homebrew

/bin/zsh -c "$(curl -fsSL)"

Rerun the SVN installation

brew install svn

After the installation is completed, execute the SVN related commands, and the prompt message changes to (the reason should be that other versions of SVN were installed at the beginning)::

Warning: subversion 1.14.0_2 is already installed, it's just not linked
You can use `brew link subversion` to link this version.

Therefore, according to the command, the command is executed

brew link subversion

New information is prompted:

Linking /usr/local/Cellar/subversion/1.14.0_2...
Error: Could not symlink include/subversion-1/mod_authz_svn.h
Target /usr/local/include/subversion-1/mod_authz_svn.h
already exists. You may want to remove it:
  rm '/usr/local/include/subversion-1/mod_authz_svn.h'

To force the link and overwrite all conflicting files:
  brew link --overwrite subversion

To list all files that would be deleted:
  brew link --overwrite --dry-run subversion

The general meaning is that there is a related soft chain, either delete the old one, or directly implement the forced coverage, and then try to force the coverage

brew link --overwrite subversion

The information is as follows:

Linking /usr/local/Cellar/subversion/1.14.0_2... 161 symlinks created

Execute the SVN help command again, and finally you can use it normally

usage: svn <subcommand> [options] [args]
Subversion command-line client.
Type 'svn help <subcommand>' for help on a specific subcommand.
Type 'svn --version' to see the program version and RA modules,
     'svn --version --verbose' to see dependency versions as well,
     'svn --version --quiet' to see just the version number.

manual version upgrade:

As the SVN of the above version 1.14 is older, consider upgrading the SVN manually

Solution to the problem of unable to load native Hadoop Library in MAC development

Problem description

When using hhbase to read hfile with snappy compression, an error is reported as follows:

java.lang.UnsatisfiedLinkError: org.apache.hadoop.util.NativeCodeLoader.buildSupportsSnappy()Z

If you go up to the log, there will be a prompt like this:

Unable to load native-hadoop library for your platform... using builtin-java classes where applicable

analysis

For this problem, we need to compile Hadoop native for Mac platform, but after compiling many versions of Hadoop, we will encounter cmake problems

Hadoop yarn server nodemanager: make failed, which can be solved by yarn-8622 patch

Hadoop MapReduce client native task: make failed

So we finally compiled Hadoop 2.8.5, Hadoop 3.1.1, Hadoop 3.2.1, Hadoop 3.2.1. There are similar problems in some versions. The first problem has been solved, and the second problem will be encountered, so we have to give up compiling

Solutions

Fortunately, there is open source, hot search Hadoop native MAC on GitHub, someone really shares it, and then replace it with native ${Hadoop}_ Some other configurations of home}/lib/native are as follows:

$ vim .zshrc
export HADOOP_HOME=/Users/jiazz/devEnvs/hadoop-3.1.1
export HADOOP_PREFIX=/Users/jiazz/devEnvs/hadoop-3.1.1
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib/native"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${HADOOP_HOME}/lib/native
export JAVA_LIBRARY_PATH=$JAVA_LIBRARY_PATH:${HADOOP_HOME}/lib/native
$ source .zshrc

In fact, the success of can be detected by the command:

Note here that Mac will check the source of the file you replaced. You need to set – > Security and privacy – > General – > Allow to open

# old
$ hadoop checknative -a
WARNING: HADOOP_PREFIX has been replaced by HADOOP_HOME. Using value of HADOOP_PREFIX.
2020-11-03 13:28:45,307 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Native library checking:
hadoop:  false 
zlib:    false 
zstd  :  false 
snappy:  false 
lz4:     false 
bzip2:   false 
openssl: false 
ISA-L:   false 
# new
$ hadoop checknative -a
WARNING: HADOOP_PREFIX has been replaced by HADOOP_HOME. Using value of HADOOP_PREFIX.
2020-11-03 13:28:59,672 WARN bzip2.Bzip2Factory: Failed to load/initialize native-bzip2 library system-native, will use pure-Java version
2020-11-03 13:28:59,677 INFO zlib.ZlibFactory: Successfully loaded & initialized native-zlib library
2020-11-03 13:28:59,967 WARN erasurecode.ErasureCodeNative: Loading ISA-L failed: Failed to load libisal.2.dylib (dlopen(libisal.2.dylib, 9): image not found)
2020-11-03 13:28:59,967 WARN erasurecode.ErasureCodeNative: ISA-L support is not available in your platform... using builtin-java codec where applicable
Native library checking:
hadoop:  true /Users/jiazz/devEnvs/hadoop-3.1.1/lib/native/libhadoop.dylib
zlib:    true /usr/lib/libz.1.dylib
zstd  :  true /usr/local/Cellar/zstd/1.4.5/lib/libzstd.1.4.5.dylib
snappy:  true /usr/local/Cellar/snappy/1.1.8/lib/libsnappy.1.1.8.dylib
lz4:     true revision:10301
bzip2:   false 
openssl: false EVP_CIPHER_CTX_reset
ISA-L:   false Loading ISA-L failed: Failed to load libisal.2.dylib (dlopen(libisal.2.dylib, 9): image not found)
2020-11-03 13:28:59,995 INFO util.ExitUtil: Exiting with status 1: ExitException

Run the program in idea again, the problem is solved It is verified that if the java -jar is run on the server, you also need to add parameters-Djava.library.path=$HADOOP_HOME/lib/native

How does MAC uninstall Jenkins

Yesterday, when I installed Jenkins, I found that my Mac had already installed Jenkins, and I forgot my password. So I searched a lot of technical blogs, but I spent several hours without finding them. Finally, I found them on foreign websites http://stackoverflow.com/questions/11608996/how-to-uninstall-jenkins
The first time I wrote a blog, it was wrong. I’m sorry

First, uninstall Jenkins, open your Mac terminal, enter the following command/or find your Jenkins file, double-click the folder to run install. Command

2. Delete some configurations that may be forgotten

sudo rm -rf /var/root/.jenkins ~/.jenkins

3. If the old Jenkins version cannot be found, use the following command

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm /Library/LaunchDaemons/org.jenkins-ci.plist
sudo rm -rf /Applications/Jenkins "/Library/Application Support/Jenkins" /Library/Documentation/Jenkins

4. Delete all the contents of Jenkins folder

sudo rm -rf /<User you replace>/Shared/Jenkins

5. Delete user and group

sudo dscl . -delete /Users/jenkins
sudo dscl . -delete /Groups/jenkins

6. The following command is also uninstalled from the newer version of Jenkins in the script

sudo rm -f /etc/newsyslog.d/jenkins.conf
pkgutil --pkgs | grep 'org\.jenkins-ci\.' | xargs -n 1 sudo pkgutil --forget

Mac version PIP install — upgrade PIP update version error

Error Message:

➜ ~ sudo pip install –upgrade pip

Collecting pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
74% |███████████████████████▊ | 888kB 21kB/s eta 0:00:15Exception:
Traceback (most recent call last):
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/basecommand.py”, line 223, in main
status = self.run(options, args)
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/commands/install.py”, line 282, in run
requirement_set.prepare_files(finder)
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py”, line 334, in prepare_files
functools.partial(self._prepare_file, finder))
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py”, line 321, in _walk_req_to_install
more_reqs = handler(req_to_install)
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/req/req_set.py”, line 491, in _prepare_file
session=self.session)
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/download.py”, line 825, in unpack_url
session,
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/download.py”, line 673, in unpack_http_url
from_path, content_type = _download_http_url(link, session, temp_dir)
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/download.py”, line 886, in _download_http_url
_download_url(resp, link, content_file)
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/download.py”, line 621, in _download_url
for chunk in progress_indicator(resp_read(4096), 4096):
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/utils/ui.py”, line 133, in iter
for x in it:
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/download.py”, line 586, in resp_read
decode_content=False):
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py”, line 307, in stream
data = self.read(amt=amt, decode_content=decode_content)
File “/Library/Python/2.7/site-packages/pip-7.1.0-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py”, line 267, in read
raise ReadTimeoutError(self._pool, None, ‘Read timed out.’)
ReadTimeoutError: HTTPSConnectionPool(host=’pypi.python.org’, port=443): Read timed out.

Solution: sudo pip install –index https://pypi.mirrors.ustc.edu.cn/simple/ –upgrade pip

MySQLdb-python Install Error

➜ ~ pip install MySQL-python
Collecting MySQL-python
Using cached MySQL-python-1.2.5.zip
Complete output from command python setup.py egg_info:
sh: mysql_config: command not found
Traceback (most recent call last):
File “<string>”, line 1, in <module>
File “/private/var/folders/rj/lcp0d7815kl2v5xh0j4zm6h00000gn/T/pip-build-tD7Et4/MySQL-python/setup.py”, line 17, in <module>
metadata, options = get_config()
File “setup_posix.py”, line 43, in get_config
libs = mysql_config(“libs_r”)
File “setup_posix.py”, line 25, in mysql_config
raise EnvironmentError(“%s not found” % (mysql_config.path,))
EnvironmentError: mysql_config not found

—————————————-
Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/rj/lcp0d7815kl2v5xh0j4zm6h00000gn/T/pip-build-tD7Et4/MySQL-python/

Solution: brew install mysql

sudo pip install MySQL-python

MAC Navicat Premium 15.0.22 Failed to save password Error code: -34018

Problems arise

The local system version is MacOS Big Sur 11.1, and the Navicat version is 15.0.22
when we create a new connection or edit an old connection, check Save password , and click Save to pop up:

Failed to save password
Error code: -34018

Although it does not affect this login, you will need to re-enter your password the next time you log in.

Cause of the problem

Recently, two PJ versions are not perfect.

After reading many blogs, one blogger plagiarized the other and wrote the following command to solve the problem:

cd /Library/Keychains
sudo rm -r *

But this is not only unsuccessful, but also causes the key chain of MAC cache to be lost, making icloud login invalid and device association broken.

Problem solving

Practice success: you can first put the 15.0.20 version back to cover the current version 15.0.22 , after saving the password under the old version , if there is a need to use the new version , then use the new version to cover it.

MAC Install homebrew Error: Failed to connect to raw.githubusercontent.com port 443: Connection refused error:

It’s been a long time. It’s time to execute

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Failed to connect to raw.githubusercontent.com port 443: Connection refused error: Error: 7,

I tried to change the agent of GIT config, but it didn’t work,

It’s no use changing the source of China University of science and technology

The final solution is as follows:

sudo vi /etc/hosts

Add the following in host

199.232.28.133 raw.githubusercontent.com

Then execute again


  /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Method 2

Re install command line tools, and then execute the installation instruction. Homebrew is installed successfully.

    removing the old tools
rm -rf /Library/Developer/CommandLineTools

install xcode command line tools again

xcode-select --install

implement

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"