I originally posted this in the wrong place and this forum was suggested as a better home for this question. I hope someone can kindly lend me a hand, thanks.....:
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!
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)
![Apt-get command for mac Apt-get command for mac](/uploads/1/2/6/4/126468677/739133492.png)
- Update the Package Repositories with apt. A repository is a list of available software packages in a.
- Used to re-synchronize the package index files from their sources.
Posted on
Git packages are available via apt: From your shell, install Git using apt-get: $ sudo apt-get update $ sudo apt-get install git; Verify the installation was successful by typing git -version: $ git -version git version 2.9.2; Configure your Git username and email using the.
Heard OS X is more like Linux ? But you might wonder that apt-get does not work by default in MAC OS X. Some folks are in love with apt-get and find it easier to install new applications using apt-get.
So in this post I am going to show you how you can make apt-get to work in MAC OS X.
To make apt-get work, you have to install FINK
- Download the FINK project from this Download Page
- Run the installer, if you have OS X version 10.5 or lesser. But if you have 10.6 or higher then you have to source compile and install. Follow the instructions here
That’s it ! Now you will able to use apt-get just like you can do in Linux. As simple as the following –
sudo apt-get install gimp
Apt-get Command Not Found Mac Terminal
Hope that helps.
Stay Digified!!
Sachin Khosla
Sachin Khosla
![Mac Mac](/uploads/1/2/6/4/126468677/812822671.png)