【问题标题】:composer php: No such file or directorycomposer php:没有这样的文件或目录
【发布时间】:2018-02-25 08:20:39
【问题描述】:

今天早上在尝试创建一个新的 laravel 项目时遇到了错误

/c/xampp/php/php:第13行:/opt/php/bin/php:没有这样的文件或目录

我仍然可以更新 composer,但是大多数其他命令都会抛出相同的错误。直到今天早上,作曲家还没有遇到任何问题。

在查看了其中一个文件后,我(我认为我)在底部找到了罪魁祸首

#!/bin/bash

# Gets the directory of this script file, also resolving symlinks:
# (reference: Dave Dopson, http://stackoverflow.com/questions/59895/can-a-
bash-script-tell-what-directory-its-stored-in )
SOURCE="${BASH_SOURCE[0]}"
while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a 
symlink
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative 
symlink, we need to resolve it relative to the path where the symlink file 
was located
done
__DIR__="$( cd -P "$( dirname "$SOURCE" )" && pwd )"

/opt/php/bin/php "-c$__DIR__/stdlib" "$@"

其他links 建议链接到php 所在的目录,但是我有点困惑,因为这不会导致/c/xampp/php/php 引用自身吗?

任何帮助将不胜感激

更新

新的php副本解决了这个问题

【问题讨论】:

  • 然后关闭问题或自己回答...
  • 谢谢萨尔克特。长期用户第一次提问,以后会记住的。

标签: php composer-php


【解决方案1】:

一个新的 php 副本解决了这个问题。

【讨论】:

    猜你喜欢
    • 2013-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-12
    • 2017-09-26
    • 2014-02-04
    • 2018-08-31
    • 2023-04-07
    相关资源
    最近更新 更多