brew link php71: Could not symlink sbin/php-fpm - php

I'm trying to install Laravel Valet, which requires php 7.1, but when i run brew install php71, I get the following error:
==> Pouring php71-7.1.10_21.high_sierra.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink sbin/php-fpm
/usr/local/sbin is not writable.
I get the same error when i run brew link php71. If i run php -v, I actually see that I'm currently running PHP 7.1.7.
But when I run valet install, I get:
[DomainException]
Unable to determine linked PHP.
I don't even have an sbin directory in /usr/local.
Any suggestions?

I solved this problem by first creating the directory sbin:
sudo mkdir /usr/local/sbin
then if you are like me using macOS highSierra 10+ you need to run:
sudo chown -R $(whoami) $(brew --prefix)/sbin
after this
brew link php

Installing Laravel Valet, I had a similar issue with sbin not being writable. I had to make the directory, then utilized the solution included at this page. This finally allowed me the proper permissions to run a brew link command with a previously installed version of php 7.1.

Related

Error installing php 71 with homebrew on my mac

I have been developing with Vallet for some time now. Today i wanted to update laravel 5.4 to 5.5. Before doing so i run composer global update. Causing Vallet to stop working.
Fist i tried to do the following:
cd ~/.composer/
sudo chown -R $(whoami) vendor
source: https://laracasts.com/discuss/channels/general-discussion/getting-valet-not-found-error
I did not solve the issue. Then i decided to reinstall Vallet. Hereby i did the following:
I followed this: https://github.com/laravel/valet/issues/321
Stop and uninstall services
sudo brew services stop php71 dnsmasq nginx
brew uninstall php71 dnsmasq nginx
Remove related config files and valet home folder
sudo rm -r /usr/local/etc/php /usr/local/etc/nginx /usr/local/etc/dnsmasq.conf
sudo rm -r ~/.valet /var/root/.valet
Install services i tried this:
brew install php71
$ brew tap homebrew/php
$ brew install php71
brew install homebrew/php/php71
All gave the following error:
MacBook-Pro:~ mblivier$ brew install homebrew/php/php71
==> Installing php71 from homebrew/php Error: The following formula: php71
cannot be installed as a binary package and must be built from source.
Install the Command Line Tools:xcode-select --install
I new in this and don't know how to solve this. Any suggestions how to install php and go further with reinstalling Vallet?
homebrew is installed and working
You need xcode to build php, so first run:
xcode-select --install
to install xcode and later you can brew install php71
This is answer for your comment, I can't post as comment, need to post because is length limited.
There is one of two things going on here, either you didn't install PHP, or PHP is installed and not currently in any of system aware paths. First I would try to find PHP and make sure it exists:
$ find / -name php -type f
You should see something like:
/path/to/your/php/bin/php
If PHP binary does exist, check your path:
$ echo $PATH
If it does not exist, recompile php.
If PHP exists on your system, make sure the path to the /bin/php file is included. You can edit your ~/.bash_profile and add the custom path like this:
PATH=$PATH:/path/to/your/php/bin/
....
export PATH
Then save and reload the file to ensure your current session has access to new path changes:
$ source ~/.bash_profile
With any luck you can now do a php -v and see the version response.

Unable to install Libreoffice and cjpeg Pimcore 5

I am installing Pimcore 5 and dependencies on Amazon EC2 Linux AMI(HVM)(t2.micro) with nginx1.2. There are these 2 packages which even if installed but not shown installed in Pimcore System requirement.
I install Libreoffice as:
wget http://ftp.ussg.indiana.edu/tdf/libreoffice/stable/5.4.1/rpm/x86_64/LibreOffice_5.4.1_Linux_x86-64_rpm.tar.gz
yum remove openoffice* libreoffice*
tar -xvf LibreOffice_5.4.1_Linux_x86-64_rpm.tar.gz
cd LibreOffice_5.4.1.2_Linux_x86-64_rpm/RPMS
rm -rf libobasis5.4-gnome-integration-5.4.1.2-2.x86_64.rpm
yum install *rpm
Now output of whereis libreoffice5.4 come as
libreoffice5: /usr/bin/libreoffice5.4
But when check Pimcore then it showing not installed, In similar way I install cjpeg as given in https://www.pimcore.org/docs/5.0.0/Installation_and_Upgrade/System_Setup_and_Hosting/Additional_Tools_Installation.html and when do whereis cjpeg then it gives output
cjpeg: /usr/bin/cjpeg /usr/local/bin/cjpeg /opt/libmozjpeg/bin/cjpeg /usr/share/man/man1/cjpeg.1.gz
But still Pimcore showing it not installed.
What and where I am missing?
Have a look at app\config\parameters.yml and add the paths to the cjpeg and soffice executables there. If that file doesn't exists make a copy of parameters.example.yml.

How do I uninstall a PHP module?

I bumped into this bit of instructions while installing an addon for a PHP framework:
Make sure you don't have the PHP module installed. This is a Debian/Ubuntu example:
sudo apt-get purge php5-geoip
I am working on Windows PC with a Virtual Machine running Laravel Homsetead. I am using Git Bash command window. When I enter the above command I get:
bash: sudo: command not found
If I remember correctly, sudo is an Apple-related command so I tried dropping it like this:
apt-get purge php5-geoip
but I get
bash: apt-get: command not found
What command do I need to use to purge php5-geoip?
EDIT: echo $PATH gives out:
$ echo $PATH
/c/Users/Arthur/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/
bin:/c/Users/Arthur/bin:/c/ProgramData/Oracle/Java/javapath:/c/Windows/system32:
/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/
c/Program Files (x86)/Intel/OpenCL SDK/2.0/bin/x86:/c/Program Files (x86)/Intel/
OpenCL SDK/2.0/bin/x64:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c
/Program Files/MATLAB/MATLAB Production Server/R2015a/runtime/win64:/c/Program F
iles/MATLAB/MATLAB Production Server/R2015a/bin:/c/Program Files/MATLAB/MATLAB P
roduction Server/R2015a/polyspace/bin:/c/Program Files (x86)/Skype/Phone:/c/PHP:
/c/ProgramData/ComposerSetup/bin:/c/Users/Arthur/AppData/Roaming/Composer/vendor
/bin:/c/HashiCorp/Vagrant/bin:/c/Program Files/nodejs:/c/Users/Arthur/AppData/Ro
aming/npm:/usr/bin/vendor_perl:/usr/bin/core_perl

PHPdbg Installation error

I am New to phpdbg. I am trying to install phpdbg using following steps: which is mentioned on site phpdbg
cd /usr/src/php-src/sapi
git clone https://github.com/krakjoe/phpdbg
cd ../
./buildconf --force
./config.nice
make -j8
make install-phpdbg
on the fourth steps i.e. when I try to do :
bash: ./buildconf: No such file or directory
From where I have to run this command.
If you're using PHP 5.5 and homebrew, do this...
brew install php55 --with-phpdbg
I think it's also supposed to work for PHP 5.4 and PHP 5.6 (may be on by default).

Laravel composer absolute path error in VB

I run local virtual box development server with ubuntu 12.04. To access files I use virtual box shared folders which are mounted into ubuntu at /media/Sites. This dir I use as DocumentRoot for apache.
When I try to run composer create-project laravel/laravel --prefer-dist I get error:
[InvalidArgumentException]
$from (/media/Sites/test.dev/laravel/vendor/bin/boris) and $to () must be absolute paths.
I assume problem is because dir /media/Sites is outside of ubuntu in windows 8.1. I also tried to create new laravel project in some linux dir and it worked without any error.
What would be the best fix for this?
Thanks in advance
Be sure you have all of the requirements installed:
$ apt-get install git php5 php5-curl php5-cli php5-mcrypt php5-json
then
$ wget https://github.com/laravel/laravel/archive/master.zip
$ unzip master.zip project
$ cd project
$ composer install --verbose
to see a stack trace of the error, then post it here for more help.
there is some bug in the boris package, were it tries to create a symlink to another directory. the solution to this is to manually create the missing file vendor/bin/boris with this content:
../d11wtq/boris/bin/boris
then run composer update again and it should work. (in our case we had also some additional problem with unaccessible files created by composer - the files exist in host but are not accessible in guest - vagrant reload helps in this case)
Had the same happen to me. Solved it by installing php5-readline.
sudo apt-get install php5-readline

Categories