-1

Ubuntu details:

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=20.04

DISTRIB_CODENAME=focal

DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"

I am trying to install magento on my linux machine. I am using ddev quick start for magento . https://ddev.readthedocs.io/en/stable/users/quickstart/#magento-2

I am getting the following error for this command:

ZipArchive::extractTo(/var/www/html/vendor/composer/90d2dd07/dev/tests/acce
ptance/tests/_data/adobe-base-image-long-name-image-long-name-image-long-na
me-image-long-name-image-long-name-image-long-name-image-long-name-image-lo
ng-name-image-long-name.jpg): Failed to open stream: File name too long

Error

I think it is due to char limitation in linux. Is there any way i can bypass it? I cant run the command in the root folder, as we cant run ddev with sudo.

rfay
  • 9,963
  • 1
  • 47
  • 89
jazyac
  • 3
  • 2
  • What docker provider are you using? – rfay Jun 07 '23 at 23:25
  • If you're trying to use Docker Desktop for Linux, please don't. See https://ddev.readthedocs.io/en/latest/users/install/docker-installation/#linux – rfay Jun 08 '23 at 19:42
  • @rfay I had issues with docker desktop earlier with other CMSs, hence i completely removed it and now use docker cli. – jazyac Jun 08 '23 at 21:11
  • @rfay output of "docker version"--- Client: Docker Engine - Community Version: 24.0.0 API version: 1.43 Go version: go1.20.4 Git commit: 98fdcd7 Built: Mon May 15 18:48:35 2023 OS/Arch: linux/amd64 Context: default – jazyac Jun 08 '23 at 21:13
  • Server: Docker Engine - Community Engine: Version: 24.0.0 API version: 1.43 (minimum version 1.12) Go version: go1.20.4 Git commit: 1331b8c Built: Mon May 15 18:48:35 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.21 GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8 runc: Version: 1.1.7 GitCommit: v1.1.7-0-g860f061 docker-init: Version: 0.19.0 GitCommit: de40ad0 – jazyac Jun 08 '23 at 21:13
  • "Docker CLI" just just the client, it's the same no matter what you're using for the engine. The engine you want to be using is docker-ce, sounds like you've got tat. I'm glad you're not trying Docker Desktop for Linux. Please do a `ddev debug test` and provide a link to the output, perhaps put it on gist.github.com or another pastebin. – rfay Jun 08 '23 at 22:32
  • @rfay https://gist.github.com/Jazyac/950b5cd0c6a56495a49ffb7a5a5fadd0 – jazyac Jun 09 '23 at 01:17
  • I just did a magento2 installation on Ubuntu 20.04 using the instructions at https://ddev.readthedocs.io/en/latest/users/quickstart/#magento-2 without any trouble. I suspect you must have an unusual filesystem or are using a network filesystem mount. – rfay Jun 09 '23 at 01:37
  • `df -T .` in the project directory should show you running with ext4. `ddev exec df -T /var/www/html` should also show you running ext4 on a standard Ubuntu setup. – rfay Jun 09 '23 at 01:39
  • `df -T .` in the project directory should show you running with ext4. `ddev exec df -T /var/www/html` should also show you running ext4 on a standard Ubuntu setup. – rfay Jun 09 '23 at 01:40
  • @rfay https://gist.github.com/Jazyac/62088a44b44b398761db1fb5aa86d24d – jazyac Jun 09 '23 at 01:47
  • Yes, your filesystem is of type ecryptfs, not standard Ubuntu. You'll find lots and lots of answers by searching https://www.google.com/search?q=ecryptfs+file+name+too+long&oq=ecryptfs+file+name&aqs=chrome.1.69i57j0i22i30j0i15i22i30l4j0i390i650l3.6151j0j4&sourceid=chrome&ie=UTF-8 – rfay Jun 09 '23 at 13:10
  • 1
    thanks @rfay. atleast now i know what to address. my home directory is ecryptfs, whereas anything outside of it is still ext4. is there any way to run ddev with root? i get permission denied errors when i try to install magento using ddev outside the home directory. – jazyac Jun 11 '23 at 21:35
  • 1
    @rfay i bypassed the issue by creating a non-root owned directory outside home.thanks! – jazyac Jun 11 '23 at 21:50

1 Answers1

0

As @rfay has pointed out, this was due to my home folder being encrypted using ecryptfs, leading to filename encryption hitting the limit. As a workaround, I have-

created a separate directory outside of my home directory and set the appropriate permissions to allow ddev to access it. Here's a step-by-step guide:

Create a new directory: Choose a location outside your home directory, for example, /opt/magento.

sudo mkdir /opt/magento

Set ownership and permissions: Assign ownership of the directory to my user account and set the appropriate permissions.

sudo chown -R yourusername:yourusername /opt/magento
sudo chmod -R 755 /opt/magento

Then i just used this folder for magento.

jazyac
  • 3
  • 2