|
|||
|
Dear Friends,
I'm running Ubuntu 8.04-LAMP and don't seem to find php command line interface anywhere in the system. I've been trying: # which php # php -v # /usr/local/bin/php # /usr/bin/php The server is running allright. PHP and Apache work together fine, but where is it hiding? Thank you for helping me! |
|
|||
|
Debian Lenny:
PHP Code:
PHP Code:
__________________
| Technology Made Simple | Outlook Email Encryption | Blackberry Email Encryption | Dell Beep Codes | |
|
|||
|
Dear DanL@VPSLink,
yes, that was the first thing I've tried. But it throws some very obscure errors: # sudo apt-get install php5-cli Reading package lists... Done Building dependency tree Reading state information... Done Package php5-cli is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package php5-cli has no installation candidate I don't seem to find any solution via google. Is something wrong with aptitude servers? I did not change any of the default settings. Thank you in advance for your help! |
|
|||
|
Try updating your package repositories:
Code:
sudo aptitude update |
|
|||
|
Quote:
Code:
cat /etc/apt/sources.list
__________________
| Technology Made Simple | Outlook Email Encryption | Blackberry Email Encryption | Dell Beep Codes | |
|
|||
|
Preamble:
I'm not allowed to post URLs, as I am yet to make 15 post. So scheme part of the URLs is replaced with [scheme://] Updated aptitude using code supplied earlier by chriss: Code:
# sudo aptitude update Hit [scheme://]us.archive.ubuntu.com hardy Release.gpg Get:1 [scheme://]us.archive.ubuntu.com hardy-updates Release.gpg [189B] Hit [scheme://]us.archive.ubuntu.com hardy Release Get:2 [scheme://]us.archive.ubuntu.com hardy-updates Release [58.5kB] Hit [scheme://]us.archive.ubuntu.com hardy/universe Packages Hit [scheme://]us.archive.ubuntu.com hardy/universe Sources Hit [scheme://]us.archive.ubuntu.com hardy/multiverse Packages Hit [scheme://]us.archive.ubuntu.com hardy/multiverse Sources Get:3 [scheme://]us.archive.ubuntu.com hardy-updates/universe Packages [227kB] Get:4 [scheme://]us.archive.ubuntu.com hardy-updates/universe Sources [46.5kB] Get:5 [scheme://]us.archive.ubuntu.com hardy-updates/multiverse Packages [29.3kB] Get:6 [scheme://]us.archive.ubuntu.com hardy-updates/multiverse Sources [5220B] Fetched 367kB in 2s (145kB/s) Reading package lists... Done Code:
# sudo apt-get install php5-cli Reading package lists... Done Building dependency tree Reading state information... Done Package php5-cli is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package php5-cli has no installation candidate Code:
# cat /etc/apt/sources.list #deb [scheme://]mirror.vpslink.com/ubuntu hardy main #deb [scheme://]mirror.vpslink.com/ubuntu hardy-updates main #deb [scheme://]mirror.vpslink.com/ubuntu hardy-security main deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy universe deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy universe deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates universe deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates universe deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy multiverse deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy multiverse deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse |
|
|||
|
Looks like php5-cli is in the ubuntu security repos, which doesn't appear to exist in your sources.list
Try adding this to your sources list, then apt-get update, apt-get install php5-cli or apt-get install php5 Code:
deb http://security.ubuntu.com/ubuntu hardy-security main http://packages.ubuntu.com/hardy/i386/php5-cli/download
__________________
| Technology Made Simple | Outlook Email Encryption | Blackberry Email Encryption | Dell Beep Codes | |
|
|||
|
Dear GuyPatterson,
I have updated sources list as you've suggested. The new list: Code:
# cat /etc/apt/sources.list #deb [scheme://]mirror.vpslink.com/ubuntu hardy main #deb [scheme://]mirror.vpslink.com/ubuntu hardy-updates main #deb [scheme://]mirror.vpslink.com/ubuntu hardy-security main deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy universe deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy universe deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates universe deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates universe deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy multiverse deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy multiverse deb [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse deb-src [scheme://]us.archive.ubuntu.com/ubuntu/ hardy-updates multiverse deb [scheme://]security.ubuntu.com/ubuntu hardy-security main Code:
# apt-get install php5-cli Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libapache2-mod-php5 php5-common php5-mysql Suggested packages: php-pear The following NEW packages will be installed: php5-cli The following packages will be upgraded: libapache2-mod-php5 php5-common php5-mysql 3 upgraded, 1 newly installed, 0 to remove and 45 not upgraded. Need to get 5332kB of archives. After this operation, 5411kB of additional disk space will be used. Do you want to continue [Y/n]? Y Get:1 [scheme://]security.ubuntu.com hardy-security/main php5-cli 5.2.4-2ubuntu5.10 [2478kB] Get:2 [scheme://]security.ubuntu.com hardy-security/main php5-mysql 5.2.4-2ubuntu5.10 [65.2kB] Get:3 [scheme://]security.ubuntu.com hardy-security/main libapache2-mod-php5 5.2.4-2ubuntu5.10 [2472kB] Get:4 [scheme://]security.ubuntu.com hardy-security/main php5-common 5.2.4-2ubuntu5.10 [317kB] Fetched 5332kB in 4s (1180kB/s) Use of uninitialized value in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17. Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 33, <> line 4. Use of uninitialized value in pattern match (m//) at /usr/share/perl5/Debconf/FrontEnd/ScreenSize.pm line 48, <> line 4. Can't fork at /usr/sbin/dpkg-preconfigure line 67, <> line 4. Selecting previously deselected package php5-cli. (Reading database ... 13798 files and directories currently installed.) Unpacking php5-cli (from .../php5-cli_5.2.4-2ubuntu5.10_i386.deb) ... dpkg: error processing /var/cache/apt/archives/php5-cli_5.2.4-2ubuntu5.10_i386.deb (--unpack): fork failed: Cannot allocate memory dpkg: error while cleaning up: fork failed: Cannot allocate memory dpkg: error while cleaning up: fork failed: Cannot allocate memory Errors were encountered while processing: /var/cache/apt/archives/php5-cli_5.2.4-2ubuntu5.10_i386.deb Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) Thank you! |
|
|||
|
Code:
fork failed: Cannot allocate memory |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|