How to install wp cli on mac - wordpress

I am running this command on my mac machine:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
But I got this error:
Warning: Failed to create the file wp-cli.phar: Read-only file system
What should I do?

Related

not able to install GCC on Solaris 11.4

I installed Solaris 11.4 x86 in VirtualBox. I need to install the GCC compiler so that I can run c code in Solaris. But each time I try to install the package this error occurs:
Errors were encountered while attempting to retrieve package or file data for the
requested operation. Details follow:
http protocol error: Unknown error code: 500 reason: Internal Server Error
URL: 'http://pkg.oracle.com/solaris/release/solaris/file/1/53eb07cd6fade116a6fdea7397c6839929ec0925'
publisher information:
I have used the following commands:
sudo pkg install developer/gcc/gcc-c-7
also tried -nv option
sudo pkg install -nv gcc
sudo pkg install -nv gcc-7
sudo pkg install -nv developer/gcc-7
see the output of the following command:
kashif#OS:~$ pkg list | grep GCC
output:
system/library/gcc/gcc-c++-runtime 7.3.0-11.4.0.0.1.14.0 i--
system/library/gcc/gcc-c++-runtime-7 7.3.0-11.4.0.0.1.14.0 i--
system/library/gcc/gcc-c-runtime 7.3.0-11.4.0.0.1.14.0 i--
system/library/gcc/gcc-c-runtime-7 7.3.0-11.4.0.0.1.14.0 i--
image below shows gcc package information from repostiry
I am trying to solve this problem for 2 days. I have read documentation from
https://docs.oracle.com/cd/E37838_01/html/E60979/publisher-config.html
I also tried to install developerstudio 12.6 but it didn't work.
overall picture of error and command:
I have googled for errors tried to find information about errors and searched for how to install GCC on Oracle Solaris 11. I couldn't find any solution to this problem.
Try "wget http://pkg.oracle.com/solaris/release/p5i/0/developer%2Fgcc.p5i" or your preferred gcc package and manually install it with pkg install. You can try:
pkg install -v
after downloading.

microsoft.dotnet-httprepl is already installed but httprepl command not found in mac

I installed httprepl with command
dotnet tool install -g Microsoft.dotnet-httprepl
httprepl is listed as installed package with command
dotnet tool list -g
Package Id Version Commands
----------------------------------------------------
microsoft.dotnet-httprepl 5.0.2 httprepl
but when i run command httprepl it says command not found.
httprepl
zsh: command not found: httprepl
How can I run httprepl on mac?
In ~/.zshrc write:
export PATH="$HOME/.dotnet/tools:$PATH"
That should do it.
dotnet tool install -g Microsoft.dotnet-httprepl
Tools directory '/Users/USER/.dotnet/tools' is not currently on the PATH environment variable.
If you are using zsh, you can add it to your profile by running the following command:
cat << \EOF >> ~/.zprofile
# Add .NET Core SDK tools
export PATH="$PATH:/Users/USER/.dotnet/tools"
EOF
And run zsh -l to make it available for current session.
You can only add it to the current session by running the following command:
export PATH="$PATH:/Users/USER/.dotnet/tools"

Rserve : ld: library not found for -lssl

I am getting an error while trying to install Rserve 1.8.6. I can successfully install 1.7.3 from CRAN. This is on Mac OS High Sierra.
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [forward] Error 1
make: *** [all] Error 2
ERROR: compilation failed for package ‘Rserve’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rserve’
The downloaded source packages are in
‘/private/var/folders/v7/hyxrfmk94p1_03gdrm27fnxncy3vq1/T/RtmpFHKNMe/downloaded_packages’
This worked for me (MacOS):
In terminal:
brew install openssl
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/
I'm running Mac OS 10.15 Catalina, I've spent 2 days trying to fix this same problem, scouring the internet for help. I finally managed it by cobbling together solutions from a few different sources.
The key thing I was missing was that Mac OS ships with its own version of openssl which it thinks is superior to anything else you can find. It is wrong. What you need to do is go and download the latest version of openssl, install that, then export THAT library to your library path variable. Here are the steps I took with openssl 1.1.1:
Get the version number for the latest version of openssl from the source (https://www.openssl.org/source/) and then manually install it directly where it's supposed to go:
cd /usr/local/src
If you're getting "No such file or directory", make it:
cd /usr/local && mkdir src && cd src
Download openssl using curl (shown) or using the link above to the source code (make sure you put the file in the directory you just made in the previous step):
curl --remote-name https://www.openssl.org/source/openssl-1.1.1f.tar.gz
Extract and cd in:
tar -xzvf openssl-1.1.1f.tar.gz
cd openssl-1.1.1f
Compile and install (these are the 64 bit Mac OS instructions. Refer to the openssl documentation for 32 bit and other OS instructions):
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/ssl/macos-x86_64
make depend
sudo make install
This created a new openssl folder so when you export the library path you have to feed it the right openssl folder:
export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl#1.1/lib/
Hope that helps you if you haven't figured it out yet, and anyone else in the future who is ready to chuck their computer across the room, like I was.

Error when installing software in Jupyter

I am running jupyter notebooks but when trying to install software with:
!pip install ipython-sql
it returns this error:
copying build/lib.linux-x86_64-2.7/prettytable.py -> /usr/local/lib/python2.7/dist-packages
error: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/prettytable.py'
And below, in red letter:
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6I8SLA/prettytable/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-nL3KsL-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-6I8SLA/prettytable/
That is all information I have. Any idea how to fix it?
I recreated your problem and solved it using:
!pip install ipython-sql --user
I use Linux Mint and Python 3.4. Using the --user flag stores libraries in your home directory, in my case under ~/.local/lib/python3.4/site-packages.

.net core raspberry pi 3 Error: Download failed

I try to follow the guide bellow to install .net core on my raspberry pi 3:
https://www.microsoft.com/net/core#debian
The script told me to install below:
dotnet_install: Error: Unable to locate libunwind. Install libunwind to continue
dotnet_install: Error: Unable to locate gettext. Install gettext to continue
i install them using apt-get install, and everything fine:
sudo apt-get install libunwind-dev
sudo apt-get install gettext
but no luck, when i run below :
sudo curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview1-002702 --install-dir ~/dotnet
i got:
dotnet_install: Error: Download failed
Are there any missing?
Please use last valid URL:
curl -sSL https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0-preview1/scripts/obtain/dotnet-install.sh | bash /dev/stdin --version 1.0.0-preview1-002702 --install-dir ~/dotnet
And it downloads and installs successfully on latest Raspbian on Raspberry Pi 2 (I think there should be no problem with Raspberry Pi 3).
However, after successful install, there is a error:
bash: dotnet: cannot execute binary file: Exec format error
I believe this is because of ARM architecture, because currently only amd64 (x64) is supported.

Resources