apt-get command not found error
So, after years of procrastinating I finally got around to sitting down and trying to use my mac mini (1.66 GHz Core Duo) as a web server with PHP5 and mysql. I've got it all working nicely, except for the darn GD library. I'm trying to create a captcha image that uses the imagecreatefrompng() PHP function. I get this error:
Fatal error: Call to undefined function imagecreatefrompng() in /Users/me/Sites/mysite/captcha.php on line 3
Like any good hodge podge comp user, I spent hours on google trying to find the solution to this and I found that most people needed to edit their php.ini file to uncomment the line:
"extension=php_gd2.dll"
So, I did this in my php.ini file and restarted apache, but to no avail - the error to "undefined function" persisted. So I kept looking and found that I needed to perhaps install the gd library first, so that PHP could use it! So, I found many people having success with this command in terminal:
sudo apt-get install php5-gd
I did this in my terminal window, but ofcouse, to no avail! I get asked for my password, and after entering it I get this error:
My-Laptop:~ me$ sudo apt-get install php5-gd
Password:
sudo: apt-get: command not found
I really don't know much about the terminal, but for some reason the apt command isn't taking the -get option. I tried with a space after the dash in "apt-get", but I get another error I can't make much sense of:
My-Laptop:~ me$ sudo apt -get install php5-gd
apt: invalid flag: -get
Usage: apt <apt and javac options> <source files>
where apt options include:
-classpath <path> Specify where to find user class files and annotation processor factories
-cp <path> Specify where to find user class files and annotation processor factories
-d <path> Specify where to place processor and javac generated class files
-s <path> Specify where to place processor generated source files
-source <release> Provide source compatibility with specified release
-version Version information
-help Print a synopsis of standard options; use javac -help for more options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
-A[key=value] Options to pass to annotation processors
-nocompile Do not compile source files to class files
-print Print out textual representation of specified types
-factorypath <path> Specify where to find annotation processor factories
-factory <class> Name of AnnotationProcessorFactory to use; bypasses default discovery process
See javac -help for information on javac options.
I'd really appreciate any pointers on how to make this apt command work as it seems to work for others, but not me . I'm stumped, I've tried loads of things and am willing to try loads more until this works!
Many thanks!
Mac mini, Mac OS X (10.5.6)