Symlink protocol error

Программируя на PHP я постоянно использую Vagrant, образ Homestead, в частности. Использование Vagrant-а при разработке часто очень здорово выручает. Но, как обычно, в мире IT должно существовать какое-то "но". И, в моём случае, вероятно, как и в вашем тоже, оно проявило себя при попытке создания символической ссылки. Каждый раз, когда я пытался создать символическую ссылку из консоли, или с помощью Laravel artisan, получал ошибку: symlink(): Protocol error, или что-то похоже. В этой статье я и

22 окт. 2018 г.
2 min read

Решаем проблем с ошибкой при создании symlink в Vagrant Homestead

Программируя на PHP я постоянно использую Vagrant, образ Homestead, в частности. Использование Vagrant-а при разработке часто очень здорово выручает. Но, как обычно, в мире IT должно существовать какое-то «но». И, в моём случае, вероятно, как и в вашем тоже, оно проявило себя при попытке создания символической ссылки. Каждый раз, когда я пытался создать символическую ссылку из консоли, или с помощью Laravel artisan, получал ошибку: symlink(): Protocol error, или что-то похоже.
В этой статье я и расскажу, почему не получается создать symlink в vagrant, и как это исправить.

Почему эта ошибка происходит

Сначала стоит разобраться с причиной, приводящей к этой ошибке. И так получается, что это причина не самая очевидная, но очень примитивная. Дело в том, что на Windows, по умолчанию, символические ссылки могут создавать только администраторы. И только потому, при попытке создания ссылки мы получаем ошибку, ввиду того, что, по-умолчанию, Vagrant запускается от имени обычного пользователя (не администратора).

Решение

Для того, чтобы решить эту проблему, достаточно будет запустить Virtual Box от имени администратора. После чего, с созданием символических ссылок внутри виртуалки проблем не будет. Статья закончена ^^.


Второй вариант — более сложный. Но, он позволяет решить эту проблему без запуска Virtual Box-а от имени администратора.
Этот способ заключается в том, что нужно разрешить создание символических ссылок любому пользователю, не являющимся админом.

Для этого, в командной строке Windows (открыть её можно, нажав правой кнопкой мыши на «Пуске«, и выбрав меню выполнить) cmd прописав secpol.msc в поле для ввода secpol.msc

В результате чего, откроется меню настроек «Локальная политика безопасности«,
где нужно выбрать пункт Локальные политики > Назначение прав пользователя,
где найти параметр под названием Создание символических ссылок:
settings

Выбрав который, и, кликнув на кнопку Добавить пользователя или группу, откроется окно с настройкой.
И, первое, что нужно сделать — это узнать имя пользователя, для которого мы будем разрешать беспрепятственное создание символических ссылок. Сделать это можно, как показано на картинке (для текущего пользователя):
find-username-1
В моём случае — это Alexander. У вас же, скорее всего, это имя будет отличаться.

Кликнув по этому имени, все конфигурационные данные автоматически будут подставлены в поля формы, и окно будет иметь примерно подобный вид:result

И на этом все шаги по настройке закончены. Осталось применить новые настройки, перезапустить виртуалку, если она включена (vagrant halt && vagrant up) и радоваться работоспособности системы.

Теперь вы знаете, как исправить ошибку при создании symlink в Windows 10 Vagrant Homestead двумя способами.

Содержание

  1. Решаем проблем с ошибкой при создании symlink в Vagrant Homestead
  2. Fomenko Alexander
  3. Почему эта ошибка происходит
  4. Решение
  5. symlink(): Protocol error #3585
  6. Comments
  7. Version information
  8. Description
  9. Steps To Reproduce
  10. Expected behavior
  11. Additional context
  12. [ErrorException] symlink(): Protocol error #1815
  13. Comments
  14. Description:
  15. Steps To Reproduce:

Решаем проблем с ошибкой при создании symlink в Vagrant Homestead

Fomenko Alexander

Программируя на PHP я постоянно использую Vagrant, образ Homestead, в частности. Использование Vagrant-а при разработке часто очень здорово выручает. Но, как обычно, в мире IT должно существовать какое-то «но». И, в моём случае, вероятно, как и в вашем тоже, оно проявило себя при попытке создания символической ссылки. Каждый раз, когда я пытался создать символическую ссылку из консоли, или с помощью Laravel artisan, получал ошибку: symlink(): Protocol error, или что-то похоже.
В этой статье я и расскажу, почему не получается создать symlink в vagrant, и как это исправить.

Почему эта ошибка происходит

Сначала стоит разобраться с причиной, приводящей к этой ошибке. И так получается, что это причина не самая очевидная, но очень примитивная. Дело в том, что на Windows, по умолчанию, символические ссылки могут создавать только администраторы. И только потому, при попытке создания ссылки мы получаем ошибку, ввиду того, что, по-умолчанию, Vagrant запускается от имени обычного пользователя (не администратора).

Решение

Для того, чтобы решить эту проблему, достаточно будет запустить Virtual Box от имени администратора. После чего, с созданием символических ссылок внутри виртуалки проблем не будет. Статья закончена ^^.

Второй вариант — более сложный. Но, он позволяет решить эту проблему без запуска Virtual Box-а от имени администратора.
Этот способ заключается в том, что нужно разрешить создание символических ссылок любому пользователю, не являющимся админом.

Для этого, в командной строке Windows (открыть её можно, нажав правой кнопкой мыши на «Пуске«, и выбрав меню выполнить) прописав secpol.msc в поле для ввода

В результате чего, откроется меню настроек «Локальная политика безопасности«,
где нужно выбрать пункт Локальные политики > Назначение прав пользователя ,
где найти параметр под названием Создание символических ссылок:

Выбрав который, и, кликнув на кнопку Добавить пользователя или группу, откроется окно с настройкой.
И, первое, что нужно сделать — это узнать имя пользователя, для которого мы будем разрешать беспрепятственное создание символических ссылок. Сделать это можно, как показано на картинке (для текущего пользователя):

В моём случае — это Alexander. У вас же, скорее всего, это имя будет отличаться.

Кликнув по этому имени, все конфигурационные данные автоматически будут подставлены в поля формы, и окно будет иметь примерно подобный вид:

И на этом все шаги по настройке закончены. Осталось применить новые настройки, перезапустить виртуалку, если она включена ( vagrant halt && vagrant up ) и радоваться работоспособности системы.

Теперь вы знаете, как исправить ошибку при создании symlink в Windows 10 Vagrant Homestead двумя способами.

Источник

symlink(): Protocol error #3585

Version information

  • Laravel: v5.7
  • Voyager: v1.1.5
  • PHP: 7.2.9
  • Database: MySQL 5.5

Description

A clear and concise description of what the bug is.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install Voyager via php artisan voyager:install —with-dummy
  2. Let it progress and do its thing
  3. See error:

Expected behavior

I expected it to finish the installation smoothly.

Additional context

I read that this might be due to the public path being different than public/ , but I never changed it. I run Laravel locally via Homestead (Vagrant and Virtualbox).

The text was updated successfully, but these errors were encountered:

That is pretty strange. I usually use Valet.

Just to narrow down the issue. You are SSH’d into your vagrant machine when you run the install command, correct?

Have you installed Valet before?

I used to use Homestead and after I moved to Valet, I’ve never looked back 👍

Figured it out! So for someone who might need this in the future:

This issue happens when you try to create symlinks from the Ubuntu VM, but the files will reflect on the Windows machine. You don’t normally have permissions to create these files on Windows without administrator permissions.

These steps fix the issue:

  1. vagrant halt the VM if it’s running
  2. Open Command Prompt or Git Bash with administrator permissions
  3. Go to your Homestead directory and vagrant up
  4. vagrant ssh into the VM and cd into your project with Voyager
  5. Run php artisan storage:link

You should get a success message and the error that I got shouldn’t appear.

@tnylea I’d love to use Valet, but sadly it’s unavailable for Windows.

Источник

[ErrorException] symlink(): Protocol error #1815

  • Laravel Version: 5.5.11
  • Voyager Version: 1.0.2
  • PHP Version: 7.1.7-1+ubuntu16.04.1+deb.sury.org+1
  • Database Driver & Version: ?? mysqlnd 5.0.12-dev — 20150407 ??

Description:

I got «[ErrorException] symlink(): Protocol error «

On command «php artisan voyager:install —with-dummy»

Steps To Reproduce:

/Code/Laravel$ composer require laravel/homestead —dev
Using version ^6.2 for laravel/homestead
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 7 installs, 0 updates, 0 removals

  • Installing symfony/yaml (v3.3.9): Loading from cache
  • Installing symfony/process (v3.3.9): Loading from cache
  • Installing psr/log (1.0.2): Loading from cache
  • Installing symfony/debug (v3.3.9): Loading from cache
  • Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
  • Installing symfony/console (v3.3.9): Loading from cache
  • Installing laravel/homestead (v6.2.2): Loading from cache
    symfony/console suggests installing symfony/event-dispatcher ()
    symfony/console suggests installing symfony/filesystem ()
    Writing lock file
    Generating autoload files
    vagrant@homestead:

/Code/Laravel$ laravel new
Crafting application.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 63 installs, 0 updates, 2 removals

  • Removing laravel/homestead (v6.2.2)
  • Removing symfony/yaml (v3.3.9)
  • Installing doctrine/inflector (v1.2.0): Loading from cache
  • Installing doctrine/lexer (v1.0.1): Loading from cache
  • Installing erusev/parsedown (1.6.3): Loading from cache
  • Installing vlucas/phpdotenv (v2.4.0): Loading from cache
  • Installing symfony/css-selector (v3.3.9): Loading from cache
  • Installing tijsverkoyen/css-to-inline-styles (2.2.0): Loading from cache
  • Installing symfony/var-dumper (v3.3.9): Loading from cache
  • Installing symfony/routing (v3.3.9): Loading from cache
  • Installing symfony/http-foundation (v3.3.9): Loading from cache
  • Installing symfony/event-dispatcher (v3.3.9): Loading from cache
  • Installing symfony/http-kernel (v3.3.9): Loading from cache
  • Installing symfony/finder (v3.3.9): Loading from cache
  • Installing egulias/email-validator (2.1.2): Loading from cache
  • Installing swiftmailer/swiftmailer (v6.0.1): Loading from cache
  • Installing paragonie/random_compat (v2.0.10): Loading from cache
  • Installing ramsey/uuid (3.7.0): Loading from cache
  • Installing psr/simple-cache (1.0.0): Loading from cache
  • Installing psr/container (1.0.0): Loading from cache
  • Installing symfony/translation (v3.3.9): Loading from cache
  • Installing nesbot/carbon (1.22.1): Loading from cache
  • Installing mtdowling/cron-expression (v1.2.0): Loading from cache
  • Installing monolog/monolog (1.23.0): Loading from cache
  • Installing league/flysystem (1.0.41): Loading from cache
  • Installing laravel/framework (v5.5.11): Loading from cache
  • Installing fideloper/proxy (3.3.4): Loading from cache
  • Installing jakub-onderka/php-console-color (0.1): Loading from cache
  • Installing nikic/php-parser (v3.1.1): Loading from cache
  • Installing jakub-onderka/php-console-highlighter (v0.3.2): Loading from cache
  • Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
  • Installing psy/psysh (v0.8.11): Loading from cache
  • Installing laravel/tinker (v1.0.2): Loading from cache
  • Installing filp/whoops (2.1.10): Loading from cache
  • Installing fzaninotto/faker (v1.7.1): Loading from cache
  • Installing hamcrest/hamcrest-php (v1.2.2): Loading from cache
  • Installing mockery/mockery (0.9.9): Loading from cache
  • Installing webmozart/assert (1.2.0): Loading from cache
  • Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
  • Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
  • Installing phpdocumentor/reflection-docblock (4.1.1): Loading from cache
  • Installing phpunit/php-token-stream (2.0.1): Loading from cache
  • Installing sebastian/version (2.0.1): Loading from cache
  • Installing sebastian/resource-operations (1.0.0): Loading from cache
  • Installing sebastian/recursion-context (3.0.0): Loading from cache
  • Installing sebastian/object-reflector (1.1.1): Loading from cache
  • Installing sebastian/object-enumerator (3.0.3): Loading from cache
  • Installing sebastian/global-state (2.0.0): Loading from cache
  • Installing sebastian/exporter (3.1.0): Loading from cache
  • Installing sebastian/environment (3.1.0): Loading from cache
  • Installing sebastian/diff (2.0.1): Loading from cache
  • Installing sebastian/comparator (2.0.2): Loading from cache
  • Installing phpunit/php-text-template (1.2.1): Loading from cache
  • Installing doctrine/instantiator (1.0.5): Loading from cache
  • Installing phpunit/phpunit-mock-objects (4.0.4): Loading from cache
  • Installing phpunit/php-timer (1.0.9): Loading from cache
  • Installing phpunit/php-file-iterator (1.4.2): Loading from cache
  • Installing theseer/tokenizer (1.1.0): Loading from cache
  • Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  • Installing phpunit/php-code-coverage (5.2.2): Loading from cache
  • Installing phpspec/prophecy (v1.7.2): Loading from cache
  • Installing phar-io/version (1.0.1): Loading from cache
  • Installing phar-io/manifest (1.0.1): Loading from cache
  • Installing myclabs/deep-copy (1.6.1): Loading from cache
  • Installing phpunit/phpunit (6.3.0): Loading from cache
    symfony/var-dumper suggests installing ext-symfony_debug ()
    symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
    symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
    symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service)
    symfony/routing suggests installing symfony/expression-language (For using expression matching)
    symfony/routing suggests installing symfony/yaml (For using the YAML loader)
    symfony/event-dispatcher suggests installing symfony/dependency-injection ()
    symfony/http-kernel suggests installing symfony/browser-kit ()
    symfony/http-kernel suggests installing symfony/class-loader ()
    symfony/http-kernel suggests installing symfony/config ()
    symfony/http-kernel suggests installing symfony/dependency-injection ()
    paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
    ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
    ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
    ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter)
    ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).)
    ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
    ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of RamseyUuidUuid as Doctrine field type.)
    symfony/translation suggests installing symfony/config ()
    symfony/translation suggests installing symfony/yaml ()
    monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
    monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
    monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
    monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
    monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
    monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
    monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
    monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
    monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
    monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
    monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
    league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
    league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
    league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
    league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
    league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
    league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
    league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
    league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
    league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
    league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
    league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
    laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (

    3.0).)
    laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (

    2.5).)
    laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (

    6.0).)
    laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (

    1.0).)
    laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (

    1.0).)
    laravel/framework suggests installing nexmo/client (Required to use the Nexmo transport (

    1.0).)
    laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (

    3.0).)
    laravel/framework suggests installing predis/predis (Required to use the redis cache and queue drivers (

    1.0).)
    laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (

    2.0).)
    laravel/framework suggests installing symfony/dom-crawler (Required to use most of the crawler integration testing tools (

    3.3).)
    laravel/framework suggests installing symfony/psr-http-message-bridge (Required to psr7 bridging features (

    1.0).)
    psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
    psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You’ll want this if your PHP install doesn’t already support readline or libedit.)
    filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
    sebastian/global-state suggests installing ext-uopz ()
    phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.5)
    phpunit/phpunit suggests installing ext-xdebug (
    )
    phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
    Generating optimized autoload files

    [InvalidArgumentException]
    Script «post-install-cmd» is not defined in this package

    run-script [—timeout TIMEOUT] [—dev] [—no-dev] [-l|—list] [—] [ ] [].

    Application ready! Build something amazing.
    vagrant@homestead:

    /Code/Laravel$ composer require tcg/voyager
    Using version ^1.0 for tcg/voyager
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 22 installs, 0 updates, 0 removals

    • Installing symfony/filesystem (v3.3.9): Loading from cache
    • Installing seld/phar-utils (1.0.1): Loading from cache
    • Installing seld/jsonlint (1.6.1): Loading from cache
    • Installing seld/cli-prompt (1.0.3): Loading from cache
    • Installing justinrainbow/json-schema (5.2.1): Loading from cache
    • Installing composer/spdx-licenses (1.1.6): Loading from cache
    • Installing composer/semver (1.4.2): Loading from cache
    • Installing composer/ca-bundle (1.0.8): Loading from cache
    • Installing composer/composer (1.5.2): Loading from cache
    • Installing larapack/hooks (v1.0.1): Loading from cache
    • Installing larapack/voyager-hooks (v1.0.2): Loading from cache
    • Installing arrilot/laravel-widgets (3.7.4): Loading from cache
    • Installing doctrine/collections (v1.5.0): Loading from cache
    • Installing doctrine/cache (v1.7.1): Loading from cache
    • Installing doctrine/annotations (v1.5.0): Loading from cache
    • Installing doctrine/common (v2.8.1): Loading from cache
    • Installing doctrine/dbal (v2.6.2): Loading from cache
    • Installing larapack/doctrine-support (v0.1.4): Loading from cache
    • Installing psr/http-message (1.0.1): Loading from cache
    • Installing guzzlehttp/psr7 (1.4.2): Loading from cache
    • Installing intervention/image (2.4.1): Loading from cache
    • Installing tcg/voyager (v1.0.2): Loading from cache
      doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
      intervention/image suggests installing ext-imagick (to use Imagick based image processing.)
      intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)
      Writing lock file
      Generating optimized autoload files

    IlluminateFoundationComposerScripts::postAutoloadDump
    @php artisan package:discover
    Discovered Package: fideloper/proxy
    Discovered Package: laravel/tinker
    Discovered Package: arrilot/laravel-widgets
    Discovered Package: intervention/image
    Discovered Package: tcg/voyager
    Package manifest generated successfully.
    vagrant@homestead:

    /Code/Laravel$ php artisan voyager:install —with-dummy
    Setting up the hooks
    Hooks are now ready to use! Go ahead and try to «php artisan hook:install test-hook»
    Publishing the Voyager assets, database, language, and config files
    Copied Directory [/vendor/tcg/voyager/publishable/assets] To [/public/vendor/tcg/voyager/assets]
    Copied Directory [/vendor/tcg/voyager/publishable/database/migrations] To [/database/migrations]
    Copied Directory [/vendor/tcg/voyager/publishable/database/seeds] To [/database/seeds]
    Copied Directory [/vendor/tcg/voyager/publishable/demo_content] To [/storage/app/public]
    Copied File [/vendor/tcg/voyager/publishable/config/voyager.php] To [/config/voyager.php]
    Copied Directory [/vendor/tcg/voyager/publishable/lang] To [/resources/lang]
    Publishing complete.
    Copied File [/vendor/intervention/image/src/config/config.php] To [/config/image.php]
    Publishing complete.
    Migrating the database tables into your application
    Nothing to migrate.
    Attempting to set Voyager User model as parent to AppUser
    Dumping the autoloaded files and reloading all new files
    Adding Voyager routes to routes/web.php
    Seeding data into the database
    Adding the storage symlink to your public folder

    [ErrorException]
    symlink(): Protocol error

    The text was updated successfully, but these errors were encountered:

    Источник

  • @dugajean

    Version information

    • Laravel: v5.7
    • Voyager: v1.1.5
    • PHP: 7.2.9
    • Database: MySQL 5.5

    Description

    A clear and concise description of what the bug is.

    Steps To Reproduce

    Steps to reproduce the behavior:

    1. Install Voyager via php artisan voyager:install --with-dummy
    2. Let it progress and do its thing
    3. See error:
    Adding the storage symlink to your public folder
    
    In Filesystem.php line 228:
    
    symlink(): Protocol error
    

    Expected behavior

    I expected it to finish the installation smoothly.

    Additional context

    I read that this might be due to the public path being different than public/, but I never changed it. I run Laravel locally via Homestead (Vagrant and Virtualbox).

    @tnylea

    That is pretty strange. I usually use Valet.

    Just to narrow down the issue… You are SSH’d into your vagrant machine when you run the install command, correct?

    Have you installed Valet before?

    I used to use Homestead and after I moved to Valet, I’ve never looked back 👍

    @dugajean

    Figured it out! So for someone who might need this in the future:

    This issue happens when you try to create symlinks from the Ubuntu VM, but the files will reflect on the Windows machine. You don’t normally have permissions to create these files on Windows without administrator permissions.

    These steps fix the issue:

    1. vagrant halt the VM if it’s running
    2. Open Command Prompt or Git Bash with administrator permissions
    3. Go to your Homestead directory and vagrant up
    4. vagrant ssh into the VM and cd into your project with Voyager
    5. Run php artisan storage:link

    You should get a success message and the error that I got shouldn’t appear.


    @tnylea I’d love to use Valet, but sadly it’s unavailable for Windows.

    vahidrk, kefir500, gerardreches, jsamaniegog, easterneas, racibaz, juvenis, and precioustone reacted with thumbs up emoji
    racibaz reacted with laugh emoji
    vahidrk, gerardreches, pathros, easterneas, and racibaz reacted with hooray emoji
    racibaz and zen-cores reacted with heart emoji

    @ramden

    Same here, not everybody uses a Mac

    @github-actions

    This issue has been automatically locked since there has not been any recent activity after it was closed. If you have further questions please ask in our Slack group.

    @github-actions
    github-actions
    bot

    locked as resolved and limited conversation to collaborators

    May 18, 2020

    Решаем проблем с ошибкой при создании symlink в Vagrant Homestead

    Fomenko Alexander

    Программируя на PHP я постоянно использую Vagrant, образ Homestead, в частности. Использование Vagrant-а при разработке часто очень здорово выручает. Но, как обычно, в мире IT должно существовать какое-то «но». И, в моём случае, вероятно, как и в вашем тоже, оно проявило себя при попытке создания символической ссылки. Каждый раз, когда я пытался создать символическую ссылку из консоли, или с помощью Laravel artisan, получал ошибку: symlink(): Protocol error, или что-то похоже.
    В этой статье я и расскажу, почему не получается создать symlink в vagrant, и как это исправить.

    Почему эта ошибка происходит

    Сначала стоит разобраться с причиной, приводящей к этой ошибке. И так получается, что это причина не самая очевидная, но очень примитивная. Дело в том, что на Windows, по умолчанию, символические ссылки могут создавать только администраторы. И только потому, при попытке создания ссылки мы получаем ошибку, ввиду того, что, по-умолчанию, Vagrant запускается от имени обычного пользователя (не администратора).

    Решение

    Для того, чтобы решить эту проблему, достаточно будет запустить Virtual Box от имени администратора. После чего, с созданием символических ссылок внутри виртуалки проблем не будет. Статья закончена ^^.

    Второй вариант — более сложный. Но, он позволяет решить эту проблему без запуска Virtual Box-а от имени администратора.
    Этот способ заключается в том, что нужно разрешить создание символических ссылок любому пользователю, не являющимся админом.

    Для этого, в командной строке Windows (открыть её можно, нажав правой кнопкой мыши на «Пуске«, и выбрав меню выполнить) прописав secpol.msc в поле для ввода

    В результате чего, откроется меню настроек «Локальная политика безопасности«,
    где нужно выбрать пункт Локальные политики > Назначение прав пользователя ,
    где найти параметр под названием Создание символических ссылок:

    Выбрав который, и, кликнув на кнопку Добавить пользователя или группу, откроется окно с настройкой.
    И, первое, что нужно сделать — это узнать имя пользователя, для которого мы будем разрешать беспрепятственное создание символических ссылок. Сделать это можно, как показано на картинке (для текущего пользователя):

    В моём случае — это Alexander. У вас же, скорее всего, это имя будет отличаться.

    Кликнув по этому имени, все конфигурационные данные автоматически будут подставлены в поля формы, и окно будет иметь примерно подобный вид:

    И на этом все шаги по настройке закончены. Осталось применить новые настройки, перезапустить виртуалку, если она включена ( vagrant halt && vagrant up ) и радоваться работоспособности системы.

    Теперь вы знаете, как исправить ошибку при создании symlink в Windows 10 Vagrant Homestead двумя способами.

    Источник

    symlink(): Protocol error in Vagrant 2.0

    I am new to Homestead and Laravel, recently I have installed Vagrant 2.0.0 in my Windows 10 PC. I have successfully installed Laravel 5.5 however there is an error of [ErrorException] symlink(): Protocol error. I have tried to solve this using

    But still, the solutions mentioned there seems to be not solving the issue. I can’t either run Git Bash & CMD in admin mode, as it gives error while running vagrant up command.

    Can anyone please give a solution for this?

    Thanks in Advance Barun

    4 Answers 4

    I solved the problem

    Create these folders under storage/framework:

    then run terminal in administrator

    • Vagrant up
    • php artisan cache:clear
    • php artisan config:clear
    • php artisan view:clear
    • php artisan storage:link

    refresh the page without cache.

    I solved mine by running bash as an Admin.

    Things to notice: If you are using a virtual box and you run bash as an Admin, this will expect that the OS/BOX is saved in the Admin state of your virtual box as well. If not, once you vagrant up, it will redownload the OS/BOX again because it is going to save now in the Admin environments. Sorry for bad English. Hope you get what I mean.

    This may help, if you have previously renamed a folder in the virtual machine there may be an old VBoxInternal2/SharedFoldersEnableSymlinksCreate entry. If a bad entry exists then you will receive the protocol error. To remove the bad entries:

    Review the list of VBoxInternal2/SharedFoldersEnableSymlinksCreate entries and for each one that is no longer valid:

    • VBoxManage setextradata VBoxInternal2/SharedFoldersEnableSymlinksCreate/

    Running this without a value at the end will remove the entry. You can confirm this by running the getextradata command once more.

    Then reload your vagrant box. This resolved this issue for me.

    You must do the below steps:

    1. you have sart git-bash as administrator
    2. then go to the Homstead folder mostly->cd: c:/users/username/homestead
    3. then type->vagrant ssh Homestead will open
    4. now you navigate to your app mein folder in example: cd: f:/homestead-projects /example-app
    5. now you have to run the artisan comands:
      • php artisan cache:clear
      • php artisan config:clear
      • php artisan view:clear
      • php artisan storage:link

    The Storage folder will be created at APP->public->storage here you see now folder created by uploading files

    Linked

    Related

    Hot Network Questions

    Subscribe to RSS

    To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

    Site design / logo © 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2023.1.10.43144

    By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.

    Источник

    symlink(): Protocol error #3585

    Comments

    dugajean commented Sep 25, 2018 •

    Version information

    • Laravel: v5.7
    • Voyager: v1.1.5
    • PHP: 7.2.9
    • Database: MySQL 5.5

    Description

    A clear and concise description of what the bug is.

    Steps To Reproduce

    Steps to reproduce the behavior:

    1. Install Voyager via php artisan voyager:install —with-dummy
    2. Let it progress and do its thing
    3. See error:

    Expected behavior

    I expected it to finish the installation smoothly.

    Additional context

    I read that this might be due to the public path being different than public/ , but I never changed it. I run Laravel locally via Homestead (Vagrant and Virtualbox).

    The text was updated successfully, but these errors were encountered:

    tnylea commented Sep 26, 2018

    That is pretty strange. I usually use Valet.

    Just to narrow down the issue. You are SSH’d into your vagrant machine when you run the install command, correct?

    Have you installed Valet before?

    I used to use Homestead and after I moved to Valet, I’ve never looked back 👍

    dugajean commented Sep 29, 2018 •

    Figured it out! So for someone who might need this in the future:

    This issue happens when you try to create symlinks from the Ubuntu VM, but the files will reflect on the Windows machine. You don’t normally have permissions to create these files on Windows without administrator permissions.

    These steps fix the issue:

    1. vagrant halt the VM if it’s running
    2. Open Command Prompt or Git Bash with administrator permissions
    3. Go to your Homestead directory and vagrant up
    4. vagrant ssh into the VM and cd into your project with Voyager
    5. Run php artisan storage:link

    You should get a success message and the error that I got shouldn’t appear.

    @tnylea I’d love to use Valet, but sadly it’s unavailable for Windows.

    Источник

    [ErrorException] symlink(): Protocol error #1815

    Comments

    0x1401 commented Sep 21, 2017

    • Laravel Version: 5.5.11
    • Voyager Version: 1.0.2
    • PHP Version: 7.1.7-1+ubuntu16.04.1+deb.sury.org+1
    • Database Driver & Version: ?? mysqlnd 5.0.12-dev — 20150407 ??

    Description:

    I got «[ErrorException] symlink(): Protocol error «

    On command «php artisan voyager:install —with-dummy»

    Steps To Reproduce:

    /Code/Laravel$ composer require laravel/homestead —dev
    Using version ^6.2 for laravel/homestead
    ./composer.json has been created
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 7 installs, 0 updates, 0 removals

    • Installing symfony/yaml (v3.3.9): Loading from cache
    • Installing symfony/process (v3.3.9): Loading from cache
    • Installing psr/log (1.0.2): Loading from cache
    • Installing symfony/debug (v3.3.9): Loading from cache
    • Installing symfony/polyfill-mbstring (v1.5.0): Loading from cache
    • Installing symfony/console (v3.3.9): Loading from cache
    • Installing laravel/homestead (v6.2.2): Loading from cache
      symfony/console suggests installing symfony/event-dispatcher ()
      symfony/console suggests installing symfony/filesystem ()
      Writing lock file
      Generating autoload files
      vagrant@homestead:

    /Code/Laravel$ laravel new
    Crafting application.
    Loading composer repositories with package information
    Installing dependencies (including require-dev) from lock file
    Package operations: 63 installs, 0 updates, 2 removals

  • Removing laravel/homestead (v6.2.2)
  • Removing symfony/yaml (v3.3.9)
  • Installing doctrine/inflector (v1.2.0): Loading from cache
  • Installing doctrine/lexer (v1.0.1): Loading from cache
  • Installing erusev/parsedown (1.6.3): Loading from cache
  • Installing vlucas/phpdotenv (v2.4.0): Loading from cache
  • Installing symfony/css-selector (v3.3.9): Loading from cache
  • Installing tijsverkoyen/css-to-inline-styles (2.2.0): Loading from cache
  • Installing symfony/var-dumper (v3.3.9): Loading from cache
  • Installing symfony/routing (v3.3.9): Loading from cache
  • Installing symfony/http-foundation (v3.3.9): Loading from cache
  • Installing symfony/event-dispatcher (v3.3.9): Loading from cache
  • Installing symfony/http-kernel (v3.3.9): Loading from cache
  • Installing symfony/finder (v3.3.9): Loading from cache
  • Installing egulias/email-validator (2.1.2): Loading from cache
  • Installing swiftmailer/swiftmailer (v6.0.1): Loading from cache
  • Installing paragonie/random_compat (v2.0.10): Loading from cache
  • Installing ramsey/uuid (3.7.0): Loading from cache
  • Installing psr/simple-cache (1.0.0): Loading from cache
  • Installing psr/container (1.0.0): Loading from cache
  • Installing symfony/translation (v3.3.9): Loading from cache
  • Installing nesbot/carbon (1.22.1): Loading from cache
  • Installing mtdowling/cron-expression (v1.2.0): Loading from cache
  • Installing monolog/monolog (1.23.0): Loading from cache
  • Installing league/flysystem (1.0.41): Loading from cache
  • Installing laravel/framework (v5.5.11): Loading from cache
  • Installing fideloper/proxy (3.3.4): Loading from cache
  • Installing jakub-onderka/php-console-color (0.1): Loading from cache
  • Installing nikic/php-parser (v3.1.1): Loading from cache
  • Installing jakub-onderka/php-console-highlighter (v0.3.2): Loading from cache
  • Installing dnoegel/php-xdg-base-dir (0.1): Loading from cache
  • Installing psy/psysh (v0.8.11): Loading from cache
  • Installing laravel/tinker (v1.0.2): Loading from cache
  • Installing filp/whoops (2.1.10): Loading from cache
  • Installing fzaninotto/faker (v1.7.1): Loading from cache
  • Installing hamcrest/hamcrest-php (v1.2.2): Loading from cache
  • Installing mockery/mockery (0.9.9): Loading from cache
  • Installing webmozart/assert (1.2.0): Loading from cache
  • Installing phpdocumentor/reflection-common (1.0.1): Loading from cache
  • Installing phpdocumentor/type-resolver (0.4.0): Loading from cache
  • Installing phpdocumentor/reflection-docblock (4.1.1): Loading from cache
  • Installing phpunit/php-token-stream (2.0.1): Loading from cache
  • Installing sebastian/version (2.0.1): Loading from cache
  • Installing sebastian/resource-operations (1.0.0): Loading from cache
  • Installing sebastian/recursion-context (3.0.0): Loading from cache
  • Installing sebastian/object-reflector (1.1.1): Loading from cache
  • Installing sebastian/object-enumerator (3.0.3): Loading from cache
  • Installing sebastian/global-state (2.0.0): Loading from cache
  • Installing sebastian/exporter (3.1.0): Loading from cache
  • Installing sebastian/environment (3.1.0): Loading from cache
  • Installing sebastian/diff (2.0.1): Loading from cache
  • Installing sebastian/comparator (2.0.2): Loading from cache
  • Installing phpunit/php-text-template (1.2.1): Loading from cache
  • Installing doctrine/instantiator (1.0.5): Loading from cache
  • Installing phpunit/phpunit-mock-objects (4.0.4): Loading from cache
  • Installing phpunit/php-timer (1.0.9): Loading from cache
  • Installing phpunit/php-file-iterator (1.4.2): Loading from cache
  • Installing theseer/tokenizer (1.1.0): Loading from cache
  • Installing sebastian/code-unit-reverse-lookup (1.0.1): Loading from cache
  • Installing phpunit/php-code-coverage (5.2.2): Loading from cache
  • Installing phpspec/prophecy (v1.7.2): Loading from cache
  • Installing phar-io/version (1.0.1): Loading from cache
  • Installing phar-io/manifest (1.0.1): Loading from cache
  • Installing myclabs/deep-copy (1.6.1): Loading from cache
  • Installing phpunit/phpunit (6.3.0): Loading from cache
    symfony/var-dumper suggests installing ext-symfony_debug ()
    symfony/routing suggests installing doctrine/annotations (For using the annotation loader)
    symfony/routing suggests installing symfony/config (For using the all-in-one router or any loader)
    symfony/routing suggests installing symfony/dependency-injection (For loading routes from a service)
    symfony/routing suggests installing symfony/expression-language (For using expression matching)
    symfony/routing suggests installing symfony/yaml (For using the YAML loader)
    symfony/event-dispatcher suggests installing symfony/dependency-injection ()
    symfony/http-kernel suggests installing symfony/browser-kit ()
    symfony/http-kernel suggests installing symfony/class-loader ()
    symfony/http-kernel suggests installing symfony/config ()
    symfony/http-kernel suggests installing symfony/dependency-injection ()
    paragonie/random_compat suggests installing ext-libsodium (Provides a modern crypto API that can be used to generate random bytes.)
    ramsey/uuid suggests installing ext-libsodium (Provides the PECL libsodium extension for use with the SodiumRandomGenerator)
    ramsey/uuid suggests installing ext-uuid (Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator)
    ramsey/uuid suggests installing ircmaxell/random-lib (Provides RandomLib for use with the RandomLibAdapter)
    ramsey/uuid suggests installing moontoast/math (Provides support for converting UUID to 128-bit integer (in string form).)
    ramsey/uuid suggests installing ramsey/uuid-console (A console application for generating UUIDs with ramsey/uuid)
    ramsey/uuid suggests installing ramsey/uuid-doctrine (Allows the use of RamseyUuidUuid as Doctrine field type.)
    symfony/translation suggests installing symfony/config ()
    symfony/translation suggests installing symfony/yaml ()
    monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
    monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
    monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
    monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
    monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
    monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
    monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
    monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
    monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
    monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
    monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
    league/flysystem suggests installing league/flysystem-aws-s3-v2 (Allows you to use S3 storage with AWS SDK v2)
    league/flysystem suggests installing league/flysystem-aws-s3-v3 (Allows you to use S3 storage with AWS SDK v3)
    league/flysystem suggests installing league/flysystem-azure (Allows you to use Windows Azure Blob storage)
    league/flysystem suggests installing league/flysystem-cached-adapter (Flysystem adapter decorator for metadata caching)
    league/flysystem suggests installing league/flysystem-eventable-filesystem (Allows you to use EventableFilesystem)
    league/flysystem suggests installing league/flysystem-rackspace (Allows you to use Rackspace Cloud Files)
    league/flysystem suggests installing league/flysystem-sftp (Allows you to use SFTP server storage via phpseclib)
    league/flysystem suggests installing league/flysystem-webdav (Allows you to use WebDAV storage)
    league/flysystem suggests installing league/flysystem-ziparchive (Allows you to use ZipArchive adapter)
    league/flysystem suggests installing spatie/flysystem-dropbox (Allows you to use Dropbox storage)
    league/flysystem suggests installing srmklive/flysystem-dropbox-v2 (Allows you to use Dropbox storage for PHP 5 applications)
    laravel/framework suggests installing aws/aws-sdk-php (Required to use the SQS queue driver and SES mail driver (

    3.0).)
    laravel/framework suggests installing doctrine/dbal (Required to rename columns and drop SQLite columns (

    2.5).)
    laravel/framework suggests installing guzzlehttp/guzzle (Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (

    6.0).)
    laravel/framework suggests installing league/flysystem-aws-s3-v3 (Required to use the Flysystem S3 driver (

    1.0).)
    laravel/framework suggests installing league/flysystem-rackspace (Required to use the Flysystem Rackspace driver (

    1.0).)
    laravel/framework suggests installing nexmo/client (Required to use the Nexmo transport (

    1.0).)
    laravel/framework suggests installing pda/pheanstalk (Required to use the beanstalk queue driver (

    3.0).)
    laravel/framework suggests installing predis/predis (Required to use the redis cache and queue drivers (

    1.0).)
    laravel/framework suggests installing pusher/pusher-php-server (Required to use the Pusher broadcast driver (

    2.0).)
    laravel/framework suggests installing symfony/dom-crawler (Required to use most of the crawler integration testing tools (

    3.3).)
    laravel/framework suggests installing symfony/psr-http-message-bridge (Required to psr7 bridging features (

    1.0).)
    psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
    psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You’ll want this if your PHP install doesn’t already support readline or libedit.)
    filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
    sebastian/global-state suggests installing ext-uopz ()
    phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.5)
    phpunit/phpunit suggests installing ext-xdebug (
    )
    phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
    Generating optimized autoload files

    [InvalidArgumentException]
    Script «post-install-cmd» is not defined in this package

    run-script [—timeout TIMEOUT] [—dev] [—no-dev] [-l|—list] [—] [ ] [].

    Application ready! Build something amazing.
    vagrant@homestead:

    /Code/Laravel$ composer require tcg/voyager
    Using version ^1.0 for tcg/voyager
    ./composer.json has been updated
    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Package operations: 22 installs, 0 updates, 0 removals

    • Installing symfony/filesystem (v3.3.9): Loading from cache
    • Installing seld/phar-utils (1.0.1): Loading from cache
    • Installing seld/jsonlint (1.6.1): Loading from cache
    • Installing seld/cli-prompt (1.0.3): Loading from cache
    • Installing justinrainbow/json-schema (5.2.1): Loading from cache
    • Installing composer/spdx-licenses (1.1.6): Loading from cache
    • Installing composer/semver (1.4.2): Loading from cache
    • Installing composer/ca-bundle (1.0.8): Loading from cache
    • Installing composer/composer (1.5.2): Loading from cache
    • Installing larapack/hooks (v1.0.1): Loading from cache
    • Installing larapack/voyager-hooks (v1.0.2): Loading from cache
    • Installing arrilot/laravel-widgets (3.7.4): Loading from cache
    • Installing doctrine/collections (v1.5.0): Loading from cache
    • Installing doctrine/cache (v1.7.1): Loading from cache
    • Installing doctrine/annotations (v1.5.0): Loading from cache
    • Installing doctrine/common (v2.8.1): Loading from cache
    • Installing doctrine/dbal (v2.6.2): Loading from cache
    • Installing larapack/doctrine-support (v0.1.4): Loading from cache
    • Installing psr/http-message (1.0.1): Loading from cache
    • Installing guzzlehttp/psr7 (1.4.2): Loading from cache
    • Installing intervention/image (2.4.1): Loading from cache
    • Installing tcg/voyager (v1.0.2): Loading from cache
      doctrine/cache suggests installing alcaeus/mongo-php-adapter (Required to use legacy MongoDB driver)
      intervention/image suggests installing ext-imagick (to use Imagick based image processing.)
      intervention/image suggests installing intervention/imagecache (Caching extension for the Intervention Image library)
      Writing lock file
      Generating optimized autoload files

    IlluminateFoundationComposerScripts::postAutoloadDump
    @php artisan package:discover
    Discovered Package: fideloper/proxy
    Discovered Package: laravel/tinker
    Discovered Package: arrilot/laravel-widgets
    Discovered Package: intervention/image
    Discovered Package: tcg/voyager
    Package manifest generated successfully.
    vagrant@homestead:

    /Code/Laravel$ php artisan voyager:install —with-dummy
    Setting up the hooks
    Hooks are now ready to use! Go ahead and try to «php artisan hook:install test-hook»
    Publishing the Voyager assets, database, language, and config files
    Copied Directory [/vendor/tcg/voyager/publishable/assets] To [/public/vendor/tcg/voyager/assets]
    Copied Directory [/vendor/tcg/voyager/publishable/database/migrations] To [/database/migrations]
    Copied Directory [/vendor/tcg/voyager/publishable/database/seeds] To [/database/seeds]
    Copied Directory [/vendor/tcg/voyager/publishable/demo_content] To [/storage/app/public]
    Copied File [/vendor/tcg/voyager/publishable/config/voyager.php] To [/config/voyager.php]
    Copied Directory [/vendor/tcg/voyager/publishable/lang] To [/resources/lang]
    Publishing complete.
    Copied File [/vendor/intervention/image/src/config/config.php] To [/config/image.php]
    Publishing complete.
    Migrating the database tables into your application
    Nothing to migrate.
    Attempting to set Voyager User model as parent to AppUser
    Dumping the autoloaded files and reloading all new files
    Adding Voyager routes to routes/web.php
    Seeding data into the database
    Adding the storage symlink to your public folder

    [ErrorException]
    symlink(): Protocol error

    The text was updated successfully, but these errors were encountered:

    Источник

  • Ошибка «EPROTO» при установке npm пакетов

    При установке npm пакетов можно получить ошибку с кодом «EPROTO». Чаще всего она возникает, когда не хватает прав для создания символических ссылок, но могут быть и другие причины. Рассмотрим способы устранения этой неприятности.

    Пример:

    npm ERR! path ../@babel/parser/bin/babel-parser.js
    npm ERR! code EPROTO
    npm ERR! errno -71
    npm ERR! syscall symlink
    npm ERR! EPROTO: protocol error, symlink '../@babel/parser/bin/babel-parser.js' -> '/home/vagrant/code/mysite.test/node_modules/.bin/parser'
    

    С такой проблемой сталкиваются программисты, которые для разработки используют виртуальную машину с коробкой «vagrant». Например, VirtualBox + Vagrant + Homestead в Laravel проектах.

    Способы устранения

    • Запустите командную строку (или редактор кода с терминалом) с правами администратора.

    • Выполните установку с дополнительными параметрами:

      npm install --no-bin-links --save-dev
    • Если операционная система Linux, то попробуйте выполнить команды после перехода в режим суперпользователя:

      sudo su
    • При использовании виртуальной машины с «vagrant» под Windows проделаем шаги:

      1. Нажмимаем клавиши Win + R для вызова окна «Выполнить».
      2. Открываем утилиту «secpol.msc» — настройки локальной политики безопасности.

        окно Выполнить

      3. В разделе с локальными политиками выбираем «Назначение прав пользователя» и в настройках ищем пункт «Создание символических ссылок». Нажимаем на него два раза и добавляем имя текущего Windows пользователя.

        изменение локальной политики

      4. Перезагружаем компьютер и пробуем повторить установку.

    В качестве бонуса оставлю команду принудительного сброса кеша менеджера пакетов. Попробуйте её выполнить если все предыдущие способы не дали нужного результата.

    npm cache clean --force
    

    Понравилась статья? Поделить с друзьями:
  • Symfony twig form error
  • Symfony prod error 500
  • Symfony oops an error occurred
  • Symfony form error template
  • Symfony form add error