I have successfully run composer for Laravel projects in the past, but this time it doesn't want to work. None of the existing threads on StackOverflow had any useful solutions for me.
I re-installed composer, and it lives at Users/becky. I tried moving it to /usr/bin/, since that seems to be where CL thinks it lives, but then I get this message: "No such file or directory"
Okay! I'm stumped! Any takers?
TYPO:
mv /Users/becky/composer.phar /usr/loca/bin/composer.phar
SHOULD BE:
mv /Users/becky/composer.phar /usr/local/bin/composer.phar
Based on the name of your user directory, I'm guessing you're on OS X. OS X, since El Capitan, does not allow access to /usr/bin. Instead, install composer in /usr/local/bin. That directory is in your path by default and you have access to it.
To move it from your directory, use:
mv /Users/becky/composer.phar /usr/local/bin/composer.phar
Then create an alias:
alias composer="/usr/bin/php /usr/local/bin/composer.phar"
Related
I've tried installing File::MMagic in CPAN using
install File::MMagic
in CPAN.
When I try to call my script and associated variable (which uses File::MMagic) it fails telling me that File/MMagic.pm can't be found in #INC. Unsure how to proceed, all suggestions welcome! I'm on Mac OS Sierra
So I solved this. The answer could be found in the error message. When it installs File::MMagic the directory structure it creates doesn't include a File directory. The script is trying to call File/MMagic.pm. By creating a new directory and calling it File and putting MMagic.pm in there it ran successfully.
I installed Python by Homebrew, it was fine for a long time. After upgrading pip to the latest version, I started to get:
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
But I can not find my pip.conf under /etc or /usr/local/etc or $HOME/Library/Application Support/pip or $HOME/.config/pip, where can I find it?
If your pip version is 9.0.1, add the following code to your ~/.pip/pip.conf to avoid the warning.
[list]
format=columns
In the newer version of pip (V>10), you can directly ask your pip and it will tell you where it is looking for its configuration file(s):
pip config list -v
The above command will tell you where the pip is looking for the pip.conf file both for use and for global.
If those directories do not exist in your machine, you can simply create them and add a pip.conf inside them. Example locations on Mac:
$HOME/Library/Application Support/pip/pip.conf
$HOME/.pip/pip.conf
$HOME/.config/pip/pip.conf
For older versions of pip (V<10), you can open a python terminal and use the pip library to extract those locations.
~/.pip/pip.conf is a legacy location in macOS. Please, read the official documentation and put your settings into ~/Library/Application Support/pip/pip.conf. It works just as must to do.
To make it more clear:
For user wide:
On macOS the configuration file is:
$HOME/Library/Application Support/pip/pip.conf if the directory exists else $HOME/.config/pip/pip.conf.
For virtualenv:
On Unix and macOS the file is $VIRTUAL_ENV/pip.conf
config-file(official doc)
Just create a pip.conf file in your folder of virtualenv, and write below content in the pip.conf
[list]
format=columns
On macOS the configuration file is $HOME/Library/Application Support/pip/pip.conf. if you cant't find it just create.
You must to do the follow steps (if you are in Windows like me):
Acess the folder C:\Users\
If dont exists, create in C:\Users a new folder called "pip"
After, enter in folder pip created and create a new file with name "pip.ini".
In this file add the follow lines:
[list]
format=columns
Open the terminal (cmd, cygwin or anaconda prompt) and try again typing:
(name_of_your_env) C:\your_path>conda env export > name_of_file.yaml
Acess the C:\your_path cited in the step 5 and notice that file exported called name_of_file.yaml was be created.
I hope I have helped! Bye!
This command will work:
pip list --format=columns
Check in ~ or /Users/<your_user_name> path. Remember to use ls -a to view all hidden files/directories. If .pip/pip.conf is not there just create it.
I'm trying to use p4 commands in my batch files on Mac like p4 login etc.
I keep getting the error "-bash p4: command not found".
I followed the top 7 steps here and got the same error:
http://www.endlesslycurious.com/2008/11/11/configuring-p4-command-line-client-on-mac-os-x/
I couldn't find anything else useful when searching.
Has anyone else encountered a similar issue and resolved it?
Just drop the "p4" executable in /usr/local/bin or even /usr/bin if you prefer. ;-)
How-To steps:
(1) Download p4 file for macOS from:
https://www.perforce.com/downloads/helix-command-line-client-p4
(2) Copy the item to any local folder under any custom folder. For ex: '/Users//perforce'
(3) Run the following commands in terminal.
chmod +x /Users/<yourname>/perforce/p4
export PATH=/Users/<yourname>/perforce:$PATH
(4) Now run 'p4' in terminal.
This should not fail!
To add to the existing answers, on my macOS Mojave, downloading Perforce 2019.1/1796703 for OSX 10.10+ using Safari gives me a p4.dms file.
You must rename it to p4 first before using it. Any attempt to unarchive the .dms file will fail. It is not a valid DMS archive.
Currently I am using cabal-install 1.16.0
I tried to update cabal-install because someone told me that newer version of ghc (7.6.1) is available. Installation result was quite successful except for this message.
Warning: could not create a symlink in /Users/MyName/Library/Haskell/bin
for cabal because the file exists there already but is not managed by cabal.
You can create a symlink for this executable manually if you wish. The
executable file has been installed at
/Users/MyName/Library/Haskell/ghc-7.4.1/lib/cabal-install-1.16.0.2/bin/cabal
I checked those locations and there was files. So installation was ok.
Based on the warning message I got, I tried to create symlinks in /Users/MyName/Library/Haskell/bin by typing this.
ln -s /Users/MyName/Library/Haskell/bin /Users/MyName/Library/Haskell/ghc-7.4.1/lib/cabal-install-1.16.0.2/bin/cabal
but It gives me simple, but frustrating message. "File Exists"
So I tried again, with existing file removed by Finder. (I just move symlink file to recycle bin.) but machine gives me same message. "File Exists"
As a result, I still have installed folder, but not working Cabal, which keep urges me to update. (version 1.16.0)
How can I solve this problem?
I realize this question was asked 6 months ago, I hope you've already found the solution. I'm posting the answer here for future reference.
You were almost there. Removing the existing symlink is the correct first step. The next step is to create the new symlink by doing:
ln -s [actual/path/to/cabal] [name_of_symlink]
You seem to have reversed this order, and this causes the "File Exists" error.
When using homebrew to install graphviz, the script gets to the point of "Making install in tkstubs" and then throws the following fatal error:
In file included from tkStubLib.c:15:
/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found
#include <X11/Xlib.h>
I have installed XQuartz as X11 has been dropped in Mountain Lion, but I'm unsure if it is installed correctly. The location of Xlib.h is:
/opt/X11/include/X11/Xlib.h
There are also two symlinks to /opt/X11, they are:
/usr/X11
/usr/X11R6
Does this look like the correct setup to you? I've never dealt with X11 or XQuartz until yesterday.
Cheers.
After installing XQuartz you may add a symlink to your X11 installation folder by just entering
ln -s /opt/X11/include/X11 /usr/local/include/X11
in terminal. That will fix the problem as well without changing any ruby script.
You need to tell the tkstubs build (and possibly other bits in the package as well) to look for headers in /opt/X11/include; this is not on the standard include path.
Usually this is achieved by passing -I/opt/X11/include as an additional compiler flag, the method to do so is however dependent on the build system.
For reasonably modern configure scripts, the best approach is to pass it in the environment variable CPPFLAGS; if the package uses another build system or this doesn't work for another reason, then you need to look at the Makefile in the build directory.
You can enter in your shell before the compile/link (or brew) command:
export CPPFLAGS=-I/opt/X11/include
The export line will tell the compile/linker to look in /opt/X11/include for the X11 include files
Had the same issue and running this command on terminal
xcode-select --install
worked for me. Run this command after installing xQuartz.
If you need this to work in your CMake builds:
if(APPLE)
include_directories(AFTER "/opt/X11/include")
endif()
That worked well for me.
I got it to install by copying the x11 header file directory to the /opt/local/include directory. Probably not the best way to work around it but quick and easy.
I found this thread while trying to compile ffmpeg from source on OS X. I needed --enable-x11grab and the homebrew build does not support this option.
I had XQuartz installed already but I kept getting errors from ./configure: ERROR: Xlib not found. I thought the answers here would solve my problem, but they did not!
So, if anyone is ever in the same boat, my solution was this:
I opened up the generated config.log and found lots of errors referring to various includes and header files, including X11/Xlib.h - this is misleading. At the very bottom of the logfile was the key, pkg-config was complaining about looking for xbc.pc, and requested that it be put on the path. However, the error message that is displayed on the terminal says nothing about pkg-config or xbc!
The solution is to add to your PKG_CONFIG_PATH environment variable. Mine was nonexistent, so I just did export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig/ (the folder where I found xbc.pc).
I reran configure and everything worked like a charm!
TL;DR: check config.log - don't trust the terminal output!
Since the make file is looking for X11/xlib.h i.e., it is looking for X11 folder in the current directory, one way to solve this problem is to simply copy the /opt/X11/include/X11 directory to the directory that contains make file.