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 trialKei Emb
3,929 PointsPlease help! sudo commands and apt-get commands not working with Mac system.
Hello all!
I am taking the Ruby Track and I am currently on the console/ git basic courses. So far I have been only able to return command line errors i.e: "Command not found" and "sudo: apt-get: command not found" .
I have a Macbook Pro and running OSX 10.8 Mountain Lion. So far from research, I have heard about homebrew and MacPorts yet unsure about how I should continue. I'd like to follow along but currently unaware how things will translate.
Your help and advice would be appreciated!!!!
3 Answers
William Li
Courses Plus Student 26,868 PointsNow as for the git course.
I believe git was preinstalled in the Mac terminal? Or maybe it's part of the Xcode command line tool? I'm not sure here.
Anyway, to find out if you have git installed, type this line in your Mac terminal.
git --version
If it returns an error, that means git is not there. The quickest way to get git install is download the git for mac here http://git-scm.com/downloads.
Joel Smith
14,779 PointsWilliam Li is correct in that the apt-get command isn't available for Mac users. Follow this link for tips on using the Mac Terminal {{ http://apple.stackexchange.com/questions/12161/os-x-terminal-must-have-utilities }}. Also regarding the Team Treehouse Console, anything that you do in the console during your session will be be purged at the end of that session. Therefore, saving or exporting isn't an option. However, during the console training, you won't really need to save anything locally.
I recommend running a VM with Ubuntu if you want the full linux experience.
You can find one of the best ones, here: https://www.virtualbox.org/
Good luck and happy coding!
-Joel
Kei Emb
3,929 PointsThank you, Joel Smith!
I will try that and hope for the best!
Thanks, again
William Li
Courses Plus Student 26,868 Pointsapt-get or Advanced Package Tool is the package manager for Debian flavor Linux distros (*Ubuntu, Debian, Mint ... etc); and it's NOT available for Mac.
Mac doesn't have an official package manager; Homebrew is currently the most popular one.
Kei Emb
3,929 PointsHello William, thanks for your reply.
What should I install or what should I do to resolve this?
Thanks
William Li
Courses Plus Student 26,868 PointsIt seems that you're referring to the console and git courses, right? Console course give you a Virtual Console to work with, just click the Launch console green button.
Kei Emb
3,929 PointsYes, I see the virtual console. However, what I do in the virtual console, will it be available to save or export?
Thanks
William Li
Courses Plus Student 26,868 Pointswill it be available to save or export?
Probably not, virtual console was created for the sole purpose of teaching the console course, I am not sure it has the save/export you looking for.
Kei Emb
3,929 PointsOk, I appreciate your help William Li. Ill give Homebrew a shot!
Kei Emb
3,929 PointsKei Emb
3,929 PointsThats what I was thinking that it was already installed. I typed in the line and it returned "-bash: git: command not found."
William Li
Courses Plus Student 26,868 PointsWilliam Li
Courses Plus Student 26,868 Pointsit's not installed then.