ubuntu - 在 Vagrant 虚拟机中使用 Composer 下载依赖项会导致文件夹损坏

标签 ubuntu paypal permissions vagrant composer-php

我有一个作为 Vagrant Box 运行的 Ubuntu 12.04.5 虚拟机。

我现在想安装一些 Composer 依赖项。这是我的 composer.json:

{
    "name": "sample/website",
    "require": {
        "php": ">=5.3.0",
        "ext-curl": "*",
        "ext-json": "*",
        "paypal/rest-api-sdk-php" : "*"
    }
}

一切正常,但现在当我导航到:

/vagrant/site/vendor/paypal/rest-api-sdk-php/lib

然后运行 ​​ls -la 我看到了这个:

ls: cannot access PayPal: No such file or directory
total 0
drwxr-xr-x 1 vagrant vagrant 102 Oct 23 19:16 ./
drwxr-xr-x 1 vagrant vagrant 510 Oct 23 19:16 ../
?????????? ? ?       ?         ?            ? PayPal

我无法cdrmchmodchown 目录。有些地方建议尝试更改其权限,因为我可能没有执行该文件的权限,但我无法执行任何操作。

我可以从我的主机 (OSX 10.9.5) 完全正常地访问它。

这甚至发生在我直接从 GitHub 克隆 PayPal 存储库时。

有什么线索吗?

最佳答案

事实证明,这是 Vagrant 无法跟踪已同步文件夹的更广泛问题的一部分。问题也在这里详细说明:https://github.com/mitchellh/vagrant/issues/985

我从该链接中获取的解决方案是遵循以下内容:http://blog.csanchez.org/2012/05/03/automatically-download-and-install-virtualbox-guest-additions-in-vagrant/

您需要安装最新版本的 guest 添加:

vagrant gem install vagrant-vbguest

然后在你的Vagrantfile中,添加

Vagrant::Config.run do |config|   
    # set auto_update to false, if do NOT want to check the correct additions   
    # version when booting this machine   
    config.vbguest.auto_update = false
end    

关于ubuntu - 在 Vagrant 虚拟机中使用 Composer 下载依赖项会导致文件夹损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26535885/

相关文章:

apache - 如何将 Apache localhost 从/var/www 移动到我的挂载目录

paypal - paypal数据的长度是多少?

reactjs - Paypal 错误处理。找不到消息 postrobot_method 的消息确认处理程序

PayPal Rest API - Webhooks/IPN - 是否可以接收 eBay 付款通知?

c - 在任务调度程序中运行C程序时出错

php - 如何构建 cms 的用户权限

linux - Qemu-ARM 用户仿真。使用 Go 时出错

ruby-on-rails - 在运行 Rails 3.1 的 Ubuntu 14.04 上运行 sidekiq 会出现 "Segmentation fault"错误

Android Manifest 和 google play store 权限问题

linux - 我的电脑支持 OpenGL 2.1 吗?