在ubuntu 18(在Digital Ocean下)上安装laravel 5.8应用程序时出现错误:
# free
total used free shared buff/cache available
Mem: 1009156 387908 147884 15716 473364 462800
我检查内存并看到:
# sudo swapon -a
# sudo fallocate -l 1G /`file
>
我尝试附加交换文件并谷歌搜索我发现的决定:
# sudo mkswap /swapfile
mkswap: cannot open /swapfile: No such file or directory
# sudo swapon /swapfile
swapon: cannot open /swapfile: No such file or directory
# cat /proc/partitions
major minor #blocks name
252 0 26214400 vda
252 1 26100719 vda1
252 14 4096 vda14
252 15 108544 vda15
# fdisk -l || mount | grep sd
Disk /dev/vda: 25 GiB, 26843545600 bytes, 52428800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C1F9A1FE-534C-4DAC-9299-5CC180C29DCE
Device Start End Sectors Size Type
/dev/vda1 227328 52428766 52201439 24.9G Linux filesystem
/dev/vda14 2048 10239 8192 4M BIOS boot
/dev/vda15 10240 227327 217088 106M Microsoft basic data
Partition table entries are not in disk order.
最后一条命令永远挂起。
接下来我尝试了:
# which composer
/usr/bin/composer
su -l lardeployer
php -d memory_limit=1024M /usr/bin/composer update
Composer could not find a composer.json file in /home/lardeployer
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
为什么出错以及如何解决?
修改版块: 作为作曲家在使节脚本中运行时,我尝试切换到使用的用户并将内存设置为下一个:
name, id, dose
ator, 034, 20
ator, 034, 30
para, 034, 30
mar, 035, 20
mar, 034, 10
但是最后一条提到“入门”部分的消息使我感到困惑。 如何解决?