关于/usr/bin/env: php: No such file or directory php执行文件不在/usr/local/bin里面

问题原因:主要是php执行文件不在/usr/local/bin里
我的php执行文件目录在  	 /usr/local/php/bin  里面  
/usr/local/php/bin: 路径下的php是执行文件

解决方案:
1.找到php的可执行文件
2.切换到/usr/local/bin目录下
3.建立软连接

[root@root bin]# ln -s /usr/local/php/bin/php  /usr/local/bin/php
[root@root bin]# ln -s /usr/local/php/bin/php  /usr/local/bin/php
[root@root bin]# l
total 34M
lrwxrwxrwx 1 root root   22 Jun  3 22:29 php -> /usr/local/php/bin/php*
-rw-r--r-- 1 root root   92 May 22 01:06 dump.rdb
lrwxrwxrwx 1 root root   12 Apr 22 09:53 redis-sentinel -> redis-server*
-rwxr-xr-x 1 root root 7.8M Apr 22 09:53 redis-check-aof*
-rwxr-xr-x 1 root root 7.8M Apr 22 09:53 redis-check-rdb*
-rwxr-xr-x 1 root root 4.6M Apr 22 09:53 redis-cli*
-rwxr-xr-x 1 root root 4.2M Apr 22 09:53 redis-benchmark*
-rwxr-xr-x 1 root root 7.8M Apr 22 09:53 redis-server*
drwxr-xr-x 3 root root 4.0K Mar  8 16:16 vendor/
-rwxr-xr-x 1 root root 102K Jan 17 11:19 iconv*
-rwxr-xr-x 1 root root 175K Jan 17 11:11 jeprof*
-rwxr-xr-x 1 root root  145 Jan 17 11:11 jemalloc.sh*
-rwxr-xr-x 1 root root 1.8K Jan 17 11:11 jemalloc-config*
-rwxr-xr-x 1 root root 756K Jan 17 11:10 htop*
[root@root bin]# composer -v
PHP Warning:  Module 'fileinfo' already loaded in Unknown on line 0
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.9.3 2020-02-04 12:58:49

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
      --no-cache                 Prevent use of the cache
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

使用composer -v 测试 出现以上成功

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值