I want to use either of apt-get
or yum
.
How to install them and make them successful running?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.
Sign up to join this communityI want to use either of apt-get
or yum
.
How to install them and make them successful running?
If you want the equivalent of apt-get or yum on Mac OS X, you have two choices.
You can use brew install PACKAGE_NAME
or port install PACKAGE_NAME
to install the package available.
brew
has become pretty much the standard as far as package managers go for MacOS. However, if you know how both package managers work and where all of the files live, I believe it should still be possible. https://stackoverflow.com/a/20889841
Jul 1, 2019 at 15:29
You need to install either Homebrew or YUM. To install Homebrew enter the following command in terminal.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
then use brew install Package_name
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
May 30, 2020 at 16:30
It is possible to use apt-get on OS X 10.9 like Deb based Linux using a third party software named Fink - How to Install apt-get on Mac OS X. However, unlike Homebrew and OS X Package Managers, Fink does not use /usr/local/ path to install software. It simply means, Fink is for a bit advanced users who can handle the software conflicts (for difference in version). Homebrew, to me is the best package manager...
Open terminal and type:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" `
Open terminal and do one of the following:
brew cask install PKG
brew install PKG
brew uninstall PKG
brew uninstall /usr/local/Cellar/*
brew search PKG
brew list
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Hope this helps!
These are some other way
visit https://sdkman.io/
# you can use sdk install command to install software
$ sdk install package_name
examples:
MacdeMacBook-Pro$ sdk install java 8.0.191-oracle
Oracle requires that you agree with the Oracle Binary Code License Agreement
prior to installation. The license agreement can be found at:
http://www.oracle.com/technetwork/java/javase/terms/license/index.html
Do you agree to the terms of this agreement? (Y/n): Y
Downloading: java 8.0.191-oracle
In progress...
########################## 100.0%
We will be needing super powers...
Password:
Repackaging Java 8u191...
Attaching to the DMG...
Mounting DMG as Volume...
Volume(s) mounted successfully
Installing PKG inside DMG...
installer: Package name is JDK 8 Update 191
installer: Installing at base path /
installer: The install was successful.
Copy JDK Home to temp folder...
Preparing archive...
Unmounting volume...
"/Volumes/JDK 8 Update 191" unmounted successfully.
Done repackaging...
Cleaning up cookie...
Installing: java 8.0.191-oracle
Done installing!
Setting java 8.0.191-oracle as default.
MacdeMacBook-Pro:Homebrew mac$ java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
Homebrew and MacPorts are the better known alternatives, so i wont spend time on those here aswell.
I am a heavy Fedora/Centos user who recently had to learn how to get Mac os to behave as much as Linux as possible. I think the best package manager i have found is pkgsrc: available here https://pkgsrc.joyent.com/
Pkgsrc has some 20000 packages, 4x HomeBrew - give it a go :-)
Short answer is, you can use brew or macports on MacOS
To Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Using Homebrew commands:
Open terminal and do one of the following:
Installing casks (applications)
brew cask install <package>
Installing kegs (command line tools and other packages)
brew install <package>
Uninstalling kegs or casks (any packages)
brew uninstall <package>
$ sdk install or i [version]
$ sdk uninstall or rm
$ sdk list or ls [candidate] # $ sdk use or u [version] $ sdk default or d [version] $ sdk current or c [candidate] $ sdk upgrade or ug [candidate]
$ sdk version or v $ sdk broadcast or b $ sdk help or h $ sdk offline [enable|disable] $ sdk selfupdate [force] $ sdk update $ sdk flush