I'm starting to learn PHP Laravel, I reached the valet installation and came to the point where I need to install mysql with brew with this command
brew install mysql
the mysql installation is done successfully, However when I run the command
brew services start mysql
I get this error that I couldn't find a solution for
sh: 1: list: not found
Error: Failure while executing: load -w
/home/chemseddinez/Library/LaunchAgents/homebrew.mxcl.mysql.plist
PS: I'm using ubuntu 16.04 LTS
brew services only works with macOS' launchctl manager. You can start mysql manually using $(brew --prefix)/bin/mysql.server.
Or you can just install apt-get install mysql-server and launch it as daemon via systemctl start mysql.
Related
I try to install php7.1 (via command brew install php#7.1) for my work-project on my new macbook, but i got following message:
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.
I can't reject using php7.1 because it requirement of my work.
How can I install php7.1 on MacOS?
Start by making sure brew is up-to-date:
brew update
Normal upgrade
brew upgrade PHP
Normal upgrade does not work in many macOS old Versions.
Upgrade with shivammathur/homebrew-php
brew tap shivammathur/php
brew install shivammathur/php/php#7.1
To switch between versions, use the following command:
brew link --overwrite --force php#7.1
Next steps
Check the current version by running php -v:
If you can then, Restart Nginx or Apache also:
refer Link
Please let me know if issuing "apt-get update" command on AWS EC2 ubuntu 14.04 machine upgrades PHP version from 7.1 to 7.2
Well, apt-get update updates the apt-get list of repositories, to update the packages installed by apt-get you should use apt-get upgrade:
# apt-get upgrade php7
or
# apt-get upgrade
You can confirm that with the following command:
sudo apt-get upgrade --dry-run
Based on Linux Man Page:
No action. Perform a simulation of events that would occur but do not
actually change the system.
I installed Valet for the first time and I had some problems listed below:
It throws an error saying:
Unable to determine linked PHP.
Even though I have PHP 7.1 installed by php-osx.liip.ch so it just goes ahead and installs PHP 7.0 with homebrew anyway!
In the non-laravel projects my localhost does not work and it responds:
ERR_EMPTY_RESPONSE
and then Valet itself does not work either!
I'm getting an error on Valet domains with message:
This site can’t be reached laravel_from_scratch.dev’s server DNS
address could not be found.
So I decided to uninstall it by running $ valet uninstall, it returns the corresponding response but then when I'm running $ valet it is all there! How to uninstall it correctly?
BTW, I posted this issue also on the Valet GitHub page.
I guess I find the solution after a little bit playing around.
It seems Valet uninstall command does not work as expected. To uninstall it first run the composer command to uninstall the php dependencies:
$ composer global remove laravel/valet
then to uninstall the dependencies installed with the Homebrew, first run;
$ brew list
just so you know we are in the same page then if you see dnsmasq and php70 in case you do not want them or you have php7 installed in another approach (like me) run:
$ brew uninstall dnsmasq
and
$ brew uninstall php70
Then go to your user directory and delete the .valet hidden directory or run the terminal command like so:
$ sudo rm -r ~/.valet
An official response here:
https://github.com/laravel/valet/issues/341#issuecomment-287048987
valet uninstall --force
sudo brew services stop nginx
sudo brew services stop php70
sudo brew services stop dnsmasq
brew uninstall nginx
brew uninstall php70
brew uninstall dnsmasq
rm -rf ~/.valet
rm /usr/local/bin/valet
I am trying to install PHP OPCACHE on my Amazon Linux EC2 instance but I am getting some errors related to conflict. The version of PHP running on my EC2 is PHP Version 5.3.29. More details can be seen here Info
I am trying to install it via SSH using Putty. I am using the following command,
sudo yum install -y php54-pecl-apc
OR
sudo yum install php55-opcache
I still get the error. Error
How can I install OPCACHE? Am I doing any other mistake?
I want to install the v8js extension for PHP5.5 on Ubuntu 12.04 but can't make it working.
When I try to install the v8js extension version 0.2.0 (latest) with PECL, I have this message:
configure: error: libv8 must be version 3.24.6 or greater
ERROR: `/tmp/pear/temp/v8js/configure --with-v8js' failed
If I try to install an old version, I have a compilation error. This message is very similar to my issue: Install v8js for php on ubuntu
How can I fix this issue?
EDIT: I couldn't install it on Ubuntu 14.04 with PHP5.5, even with a PHP downgrade with PHPbrew to PHP 5.4. However, using Ubuntu 12.04 with PHP 5.4 works great. I didn't try the downgrade from PHP 5.5 to 5.4 on Ubuntu 12.04.
in case you can't find libv8-dev or libv8-dbg, you can find the correct version by run command
~$ apt-cache search libv8
libv8-3.14-dbg - V8 JavaScript engine - debugging symbols
libv8-3.14-dev - V8 JavaScript engine - development files for 3.14 branch
libv8-3.14.5 - V8 JavaScript engine - runtime library
libv8-dev - V8 JavaScript engine - development files for latest branch
then you can run
~$ sudo apt-get install libv8-3.14-dev libv8-3.14-dbg g++ cpp
then you can try to install v8js via pecl by running
~$ sudo pecl install v8js-0.2.0
if that command return error like this
configure: error: libv8 must be version 3.24.6 or greater
ERROR: `/tmp/pear/temp/v8js/configure --with-v8js' failed
you can try to install v8js-0.1.3 instead by running
~$ sudo pecl install v8js-0.1.3
then edit your php.ini to add v8js extension
~$ echo "extension=v8js.so" >> /etc/php5/cli/php.ini
Open your terminal/console
sudo apt-get install libv8-dev libv8-dbg g++ cpp
Make an update sudo apt-get update
Try sudo pecl install v8js-0.2.0 (or other version i.e.: sudo pecl install v8js-0.1.3)
Edit your php.ini (Check: Where is my php.ini file?) file by adding: extension=v8js.so.
Restart server
If it the extension still doesn't work, try to edit /etc/php5/conf.d/v8js.ini and add extension=v8js.so and restart server again.
Hope this helps.
These other answers work well and I used v8js-0.1.3 for the past 1.5 years but after needing to upgrade to PHP 7 I needed a better solution as v0.1.3 doesn't compile with PHP 7 (something to do with php_smart_str being renamed to php_smart_string).
After a couple hours of frustrating research and compiling libv8 myself, I didn't want to have to go through this whole process on every server I provisioned.
Anyway, I found this site which points you to a launchpad PPA site that provides a couple different ubuntu packages with the 5.1 and 5.2 libv8 libraries.
I ran these commands (please don't add repositories of 3rd party devs without understanding the risks).
sudo apt-add-repository ppa:pinepain/libv8-5.2
sudo apt-get update
sudo apt-get install libv8-5.2-dev
sudo pecl install v8js-1.1.0
(Thanks #JeyKeu for suggesting to add "apt-get update" to these commands)
I couldn't get v8js-1.3.0 or 1.2.0 to build, but 1.1.0 worked well. I checked the changelog and found that the latest updates are not necessary in my circumstance anyway.