Reputation: 4462
I am facing a strange issue in ubuntu
when I hit this
curl -i -X POST -d '{"name":"kuldeep dangi", "Service_Request"}' http://localhost/index.php
from terminal I am receiving
The program 'curl' is currently not installed. You can install it by typing:
sudo apt-get install curl
but when I make the same curl request using PHP
I am getting the expected reult.
Upvotes: 0
Views: 3210
Reputation: 1208
I tried several pattern but this one finally work. Basically this problem arise because of unfinished installation in your OS. By the way, my OS is Xubuntu. (Ya. Old Soul)
sudo apt-get update
sudo apt-get install aptitude
after finishing all the steps run :-
sudo aptitude install curl
I think this one help some people. Thank you !!
Upvotes: 0
Reputation: 5287
curl
is a linux utility that is run as a command from bash
. This is not installed in your system. You can obvs install it by
sudo apt-get install curl //for ubuntu, etc.
PHP curl command does the same thing but is a utility of PHP. When you install php in your system, it gets installed.
*I don't really know, but I think you installed php through LAMP
If you run something like:
shell_exec(curl *url*)
through php, it won't execute because you are trying to run curl from shell, which is not installed.
Upvotes: 2