Since I have been in contact with the Ubuntu system before, I am quite familiar with the command
sudo apt-get install XXX for a convenient installation software package. I have always felt that Mac is also a Linux system and there should be little difference between Ubuntu. However, today, when using the command
sudo apt-get install libxml2, the Mac system reported
-bash:apt-get:command not found. Later, I found out that the original apt-get is debian(Ubuntu) package manager, so I continued to query the solution.
Solution 1: Brew is used instead of Apt-GET
What is brew?
Homebrew is a software package management tool on Mac OSX that can be easily installed or uninstalled on the Mac.
How to install?
All you need to do to install is type the following command on the terminal (the Mac comes with Ruby and you don’t need to install it)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After installation, use
brew install libxml2. For more brew features, please use
brew --help to view its help documentation.
Solution 2: Fink
What is Fink?
The Fink project hopes to bring a variety of open source software on Unix to the Darwin and Mac OS X platforms. We modified Unix software to compile and run (” port “) on Mac OS X, and provided a convenient distribution system so that everyone could download and use it. Fink USES tools in Debian such as DPKG and Apt-get to provide powerful binary package management. (The above content is from Fink’s official website)
How to install?
1. Open the following link to find the installation method of the corresponding version of OSX
my system version is 10.10.3
can be in the upper left corner of the system apple -> About the local view system version
More/System/Library/CoreServices/SystemVersion plist output
& lt; key> ProductVersion< /key>
< string> 10.10.3 & lt; /string>
As mentioned in the link above, there are two ways to install version 10.10, one is to use a script provided by Fink for automatic installation, and the other is to download the zip for manual installation. I chose the first method, easy and quick 🙂
this address is a github address, I am not familiar with github, I have not found the way to download this file directly –So when I got to the link, I chose to copy the code and pasted it into a file called Install_Fink
chmod +x ./Install_Fink // Modify the file as an executable ./Install_Fink // Run the File
The script then checks to see if there are pre-installed xcode-select /Java/XQuartz programs in the system, without prompting for installation, and prompts you to continue by clicking any key or to exit by using Ctrl+ C and entering a password during the run. When the script downloads the Fink installation, it will be prompted with some configuration options. If it is not clear, Enter directly USES the default configuration or selects Y.
our prompt you to some basic installation is complete we lift upgrade has been completed, please run fink update – all take a look at what other have not upgraded, you may find this time after the input prompt can not find fink this command, if in the previous tip configuration Path when you don’t have refused to him, then only need to restart the terminal fink can use before ~ if you turned him down, and run which fink command what all can’t find the words, So you can run the Shell script
/sw/bin/pathsetup.sh to configure the Path 🙂
(2) download the installed package
this method I don’t have a try, the installation process and order is the same as the script, specific please refer to the above gives a version of the installation address, probably look at the main steps include install xcode – select – & gt; Decompression package — & GT; Run./the bootstrap – & gt; Set the Path – & gt; Download the description file and the patch
After the installation is complete in terminal input
sudo apt - get the install libxml2 </ code> surprise you will find that you can use ~ another Fink is not only a package manager, it also provides many other functions, so far I haven't to explore XD, another during installation to download command select features to install, I don't have to explore deeply ~ everything is waiting for you to read a text to dig too ~ if you have any questions about this article can give me a message, I will try my best to help solve ^. ^
- Prompt “libevent not found” when installing tmux
- MacOS WGet ‘command not found’ solution
- Install and run phantomjs on MAC
- Installation and use of graphviz under mac
- brew install tmux: Error: parent directory is world writable but not sticky
- Ubuntu 12.04 installation and use of airtrack ng tutorial
- Win10 system virtual machine installation of Ubuntu system failed, prompt: UBI language failed with exit code 1
- Error watching file for changes: EMFILE
- How to Fix Linux sub process /usr/bin/dpkg returned an error code (1)
- Installing docker on Huawei Kunpeng server arm64
- Beatifulsoup MAC installation solution Python 3
- Solution not found by JPS command
- Error: Failed dependencies: error encountered when installing rpm package
- Mex compiler error handling in MATLAB and GCC installation in Ubuntu
- Ubuntu 16.04 install Chinese input method
- Python installation tutorial
- Tensorflow installation and uninstall (Anaconda version)
- Linux has no way to solve bash. / that file or directory
- Linux novice: unable to locate package error solution