Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

sudo apt-get install not working on 10.10 yosemite.

Hey,

sudo apt-get used to work on my macbook air early 2013, but does not work now I have upgraded to 10.10 yosemite. Any help?

Might need to re-install xcode command-line tools.

3 Answers

The apt-get command is part of the Advanced Packaging Tools for Debian Linux and is not supported on OS X. It's possible that if this had worked in the past you aliased another command.

If you are looking for a command line tool for installing and managing packages on OS X then you are looking for Homebrew. It is easy to install via the command line using this command

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

Once installed you can use the brew command much like apt-get.

Apt is a package manager typically used on Debian-based Linux distros (like Ubuntu). If you were using it before, you must have installed it manually. Are you sure you're not confusing Apt for an OS X-centric package manager like Homebrew?

It sounds like Apt may be available on OS X as part of Fink, but I'd strongly suggest using Homebrew instead.

Thanks for your help! I will try homebrew again, I did prefer apt-get, but I have used homebrew before and it is great, thanks :).