GNU/Linux >> Linux の 問題 >  >> Ubuntu

「キャッシュディレクトリ/home//.composer/cache/repo/https—packagist.org/を作成できません。または、ディレクトリが書き込み可能ではありません。キャッシュなしで続行しますか?」

ここに初心者。

このインストールガイドに従って、UbuntuにMISPをインストールしようとしました:INSTALL.ubuntu1804.txt

この指示に関しては:

# Once done, install CakeResque along with its dependencies if you intend to use the built in background jobs:
cd /var/www/MISP/app
sudo -u www-data php composer.phar require kamisama/cake-resque:4.1.2

私はこれを手に入れました:

Cannot create cache directory /home/akatiubuntutest/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/akatiubuntutest/.composer/cache/files/, or directory is not writable. Proceeding without cache
./composer.json has been updated
Cannot create cache directory /home/akatiubuntutest/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /home/akatiubuntutest/.composer/cache/files/, or directory is not writable. Proceeding without cache
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing monolog/monolog (1.23.0)
    Downloading: 65%^C        

ここで解決策を試しましたキャッシュディレクトリを作成できません! composerでlaravelプロジェクトを作成するときにこれを解決するのを手伝ってください:

sudo chown -R <user> /home/<user>/.composer/cache/repo/https---packagist.org

しかし(まあ、論理的には、まだ作成されていないので)私はこれを手に入れました:

chown: cannot access '/home/<user>/.composer/cache/repo/https---packagist.org/': No such file or directory

PHPと依存関係をすでにインストールしています:

# Install PHP and dependencies
sudo apt-get install libapache2-mod-php php php-cli php-gnupg php-dev php-json php-mysql php-opcache php-readline php-redis php-xml php-mbstring

今のところ、何をし損ねたかわかりません。

承認された回答:

コマンドにグループ情報が含まれていないようです

sudo chown -R <user> /home/<user>/.composer/cache/repo/https---packagist.org

シャウド

sudo chown -R <user>:<group> /home/<user>/.composer/cache/repo/https---packagist.org

ただし、他の許可の問題を回避するために、私はむしろアドバイスしたいと思います:

sudo chown -R <user>:<group> /home/<user>/.composer/cache

(そこにある他のフォルダにアクセスする必要があります)
および

sudo chown <user>:<group> /home/<user>/.composer

ユーザーがグローバルcomposerフォルダーに対して十分な権限を持っていることを確認します。ルートによって作成されたキーをユーザーが所有しないように、欠落している再帰に注意してください。
グループを見つける必要がある場合:

groups <user>

Ubuntu
  1. Linuxは複数の連続したパスセパレーター(/ home //// username /// file)をどのように処理しますか?

  2. Linux:/ dev / console、/ dev / tty、/ dev / tty0の違いは?

  3. Bash =〜正規表現とHttps://regex101.com/?

  1. Debian – / var、/ homeを別のパーティションに移動しますか?

  2. / bin/shが/bin/bashではなく/bin/ dashを指すのはなぜですか?

  3. Kubuntuがログイン時にエラーを表示する(file:///usr/share/sddm//themes/breeze/main.qml:noそのようなファイルまたはディレクトリ)?

  1. プロセスが実行されているフォルダーを見つける方法は?

  2. なぜ /home 以外のものを別のパーティションに入れるのですか?

  3. echo または print /dev/stdin /dev/stdout /dev/stderr