Osx Install Npm



  • Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question.Provide details and share your research! Asking for help, clarification, or responding to other answers.
  • Install Go Lang on MacOS with Homebrew! I’ve started learning Go lang. It seems to be built by the right people with the right expectations. So, the first thing I did was install go on Mac with Homebrew. 👨‍💻 I’m teaching thousands of devs how to become VSCode Power Users → This site is super fast?!

Npm cache doesnt work for node versions 8.9.4. It says 'npm ERR! As of npm@5, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid. If you want to make sure everything is consistent, use 'npm cache verify' instead'. In this case, what is the turnaround for 'npm cache clean'?

  • Installation - Linux / Unix / macOS
    • Downloading the Composer Executable
  • Installation - Windows

Composer is a tool for dependency management in PHP. It allows you to declarethe libraries your project depends on and it will manage (install/update) themfor you.

Dependency management#

Composer is not a package manager in the same sense as Yum or Apt are. Yes,it deals with 'packages' or libraries, but it manages them on a per-projectbasis, installing them in a directory (e.g. vendor) inside your project. Bydefault, it does not install anything globally. Thus, it is a dependencymanager. It does however support a 'global' project for convenience via theglobal command.

This idea is not new and Composer is strongly inspired by node'snpm and ruby's bundler.

Suppose:

  1. You have a project that depends on a number of libraries.
  2. Some of those libraries depend on other libraries.

Composer:

  1. Enables you to declare the libraries you depend on.
  2. Finds out which versions of which packages can and need to be installed, andinstalls them (meaning it downloads them into your project).
  3. You can update all your dependencies in one command.

See the Basic usage chapter for more details on declaringdependencies.

System Requirements#

Composer requires PHP 5.3.2+ to run. A few sensitive php settings and compileflags are also required, but when using the installer you will be warned aboutany incompatibilities.

To install packages from sources instead of plain zip archives, you will needgit, svn, fossil or hg depending on how the package is version-controlled.

Composer is multi-platform and we strive to make it run equally well on Windows,Linux and macOS.

Installation - Linux / Unix / macOS#

Downloading the Composer Executable#

Composer offers a convenient installer that you can execute directly from thecommand line. Feel free to download this fileor review it on GitHubif you wish to know more about the inner workings of the installer. The sourceis plain PHP.

There are in short, two ways to install Composer. Locally as part of yourproject, or globally as a system wide executable.

Locally#

To install Composer locally, run the installer in your project directory. Seethe Download page for instructions.

The installer will check a few PHP settings and then download composer.pharto your working directory. This file is the Composer binary. It is a PHAR(PHP archive), which is an archive format for PHP which can be run onthe command line, amongst other things.

Now run php composer.phar in order to run Composer.

You can install Composer to a specific directory by using the --install-diroption and additionally (re)name it as well using the --filename option. Whenrunning the installer when followingthe Download page instructions add thefollowing parameters:

Now run php bin/composer in order to run Composer.

Globally#

You can place the Composer PHAR anywhere you wish. If you put it in a directorythat is part of your PATH, you can access it globally. On Unix systems youcan even make it executable and invoke it without directly using the phpinterpreter.

After running the installer following the Download page instructionsyou can run this to move composer.phar to a directory that is in your path:

If you like to install it only for your user and avoid requiring root permissions,you can use ~/.local/bin instead which is available by default on someLinux distributions.

Note: If the above fails due to permissions, you may need to run it againwith sudo.

Note: On some versions of macOS the /usr directory does not exist bydefault. If you receive the error '/usr/local/bin/composer: No such file ordirectory' then you must create the directory manually before proceeding:mkdir -p /usr/local/bin.

Note: For information on changing your PATH, please read theWikipedia article and/or useyour search engine of choice.

Now run composer in order to run Composer instead of php composer.phar.

Installation - Windows#

Using the Installer#

This is the easiest way to get Composer set up on your machine.

Download and runComposer-Setup.exe. It willinstall the latest Composer version and set up your PATH so that you cancall composer from any directory in your command line.

Note: Close your current terminal. Test usage with a new terminal: This isimportant since the PATH only gets loaded when the terminal starts.

Manual Installation#

Change to a directory on your PATH and run the installer followingthe Download page instructionsto download composer.phar.

Create a new composer.bat file alongside composer.phar:

Using cmd.exe:

Using PowerShell:

Add the directory to your PATH environment variable if it isn't already.For information on changing your PATH variable, please seethis article and/oruse your search engine of choice.

Close your current terminal. Test usage with a new terminal:

Using Composer#

Now that you've installed Composer, you are ready to use it! Head on over to thenext chapter for a short demonstration.

Basic usage →

Found a typo? Something is wrong in this documentation? Fork and edit it!

Follow the instructions below to download and install the selected ZeroMQlibrary.

Windows

Release 4.3.2

Download and extract one of the followings:

OSX

You need Brew installed and configured https://brew.sh/

czmq and zyre are also available.

Linux

Fedora

Ubuntu/Debian/Mint

Arch

SUSE

Packages for Debian, Ubuntu, Fedora, CentOS, RHEL, SUSE

The ZeroMQ maintainers provide pre-built binary packages for libzmq, czmq, zyre, malamute, zproject and zproto, automatically built from both the latest stable releases OR the latest commit in the Git repositories via the Open Build Service for i386, amd64, armv7, arm64, ppc64, s390x (note: depends on the distribution).

Add the repository of your choice by clicking on the distribution and version, and then follow “Go to download repository”. That is the URL of the repository. Remember to add the GPG key.

For example, to add Debian 9 and install the development packages for libzmq from the latest stable release without draft APIs:

Install from a package manager

Linux

Deb packages are available for Debian and Ubuntu.

For other distros please refer to pkgs.org.

You can also get prebuild binaries for latest git master for most distros on openSUSE’s Build Service:

Git master only stable APIs:http://software.opensuse.org/download.html?project=network%3Amessaging%3Azeromq%3Agit-stable&package=czmq

Git master including draft APIs:http://software.opensuse.org/download.html?project=network%3Amessaging%3Azeromq%3Agit-draft&package=czmq

MacOS

On macOS install czmq with Homebrew see here.

Windows

Using vcpkg

If you are already using vcpkg, you can download and install czmq with one single command:

this will build czmq as a 32-bit shared library.

this will build czmq as a 64-bit static library.

You may also build czmq with one or more optional libraries:

this will build czmq with libcurl, libmicrohttpd, lz4, as a 64-bit shared library.

To use the draft APIs, you may build czmq with draft feature:

If you are an adventurer, and want to always use the lastest version of czmq, pass an extra --head option:

These commands will also print out instructions on how to use the library from your MSBuild or CMake-based projects.

Requirements

ZeroMQ 2.2.x or later. We recommend to use ZeroMQ >= 3.C++11 compliant compiler. (g++ >= 4.7)

The command line client and the tests also require libboost.

Installation

Installation can be done by the standard make && make install. If the boostunittest framework is installed, check and installcheck can be run for sanitychecking. To use ZMQ4 security feature install libsodium and libzmq –with-libsodiumas shown below before ZMQPP.

git clone git://github.com/jedisct1/libsodium.gitcd libsodium./autogen.sh./configure && make checksudo make installsudo ldconfigcd ../

git clone git://github.com/zeromq/libzmq.gitcd libzmq./autogen.sh./configure –with-libsodium && makesudo make installsudo ldconfigcd ../

git clone git://github.com/zeromq/zmqpp.gitcd zmqppmakemake checksudo make installmake installcheck

The most commonly useful overrides are setting CXX, to change the compilerused, and PREFIX to change install location. The CXX prefix should be used onall targets as the compiler version is used in the build path. PREFIX is onlyrelevant for the install target.

Building and installation

Building requires a recent version of CMake (2.8.12 or later for Visual Studio, 2.8 or later for the rest), and a C++ compilerwhich supports C++11. Currently this has been tested with -* Xcode 5.1 on OS X 10.8* Xcode 6 on OS X 10.9* Xcode 6.4 on OS X 10.10* Xcode 7.1 on OS X 10.11* GCC 4.8 + Boost 1.48 on CentOS 6* GCC 4.8 + Boost 1.53 on CentOS 7* GCC 4.8 on Arch Linux and Ubuntu* GCC 4.8 on Ubuntu* GCC 5.3 + Boost 1.60 on Ubuntu* Microsoft Visual Studio 2013 on Windows Server 2008 R2

Library dependencies are -* Boost 1.48 or later* ZeroMQ 4.0.x

Tests and example code require -* Boost 1.54 or later

To build on Linux / OS X -

To build on Windows -

You can also open Visual Studio solution from build directory after invoking CMake.

To change the default install location use -DCMAKE_INSTALL_PREFIX when invoking CMake.

Install

To change where the build looks for Boost and ZeroMQ use -DBOOST_ROOT=<my custom Boost install> and -DZMQ_ROOT=<my custom ZeroMQ install> when invoking CMake. Or set BOOST_ROOT and ZMQ_ROOT environment variables.

Install

You can install chumak from hex.pm by including the following in your rebar.config:

where X.Y.Z is one of the release versions.

For more info on rebar3 dependencies see the rebar3 docs.

Requirements

zmq4 is just a wrapper for the ZeroMQ library. It doesn’t include thelibrary itself. So you need to have ZeroMQ installed, including itsdevelopment files. On Linux and Darwin you can check this with ($ isthe command prompt):

The Go compiler must be able to compile C code. You can check thiswith:

You can’t do cross-compilation. That would disable C.

Install

go get github.com/pebbe/zmq4

Install

Dependencies

For CZMQ master

A Note on Build Tags

The CZMQ library includes experimental classes that are not built by default, but can be builtby passing --enable-drafts to configure. Support for these draft classes are being addedto goczmq. To build these features against a CZMQ that has been compiled with --enable-drafts,use go build -tags draft.

For CMZQ = 4.2

Note: CZMQ 4.2 is has not been released yet.

For CZMQ Before 4.0

Usage

Maven

Add it to your Maven project’s pom.xml:

Ant

To generate an ant build file from pom.xml, issue the following command:

Install ZeroMQ.js with prebuilt binaries:

Requirements for prebuilt binaries:

  • Node.js 10.2+ or Electron 3+ (requires a N-API version 3+)

Prebuilt binaries

The following platforms have a prebuilt binary available:

  • Linux on x86-64/armv7/armv8 with libstdc++.so.6.0.21+ (glibc++ 3.4.21+), for example:
  • Debian 9+ (Stretch or later)
  • Ubuntu 16.04+ (Xenial or later)
  • CentOS 8+
  • Linux on x86-64 with musl, for example:
  • Alpine 3.3+
  • MacOS 10.9+ on x86-64
  • Windows on x86/x86-64

If a prebuilt binary is not available for your platform, installing will attempt to start a build from source.

Building from source

If a prebuilt binary is unavailable or if you want to pass certain options during build, you can build this package from source.

Make sure you have the following installed before attempting to build from source:

  • Node.js 10+ or Electron 3+
  • A working C++17 compiler toolchain with make
  • Python 2.7 (or Python 3 with Node 12.13+)
  • CMake 2.8+
  • curl

To install from source

If you want to link against a shared ZeroMQ library, you can build skip downloading libzmq and link with the installed library instead as follows:

If you wish to use any DRAFT sockets then it is also necessary to compile the library from source:

Downloading

Unless you specifically want to develop PyZMQ, we recommend downloadingthe PyZMQ source code or wheels fromPyPI,or install with conda.

You can also get the latest source code from our GitHub repository, butbuilding from the repository will require that you install recent Cython.

Building and installation

For more detail on building pyzmq, see our Wiki.

We build wheels for OS X, Windows, and Linux, so you can get a binary on those platforms with:

pip install pyzmq

but compiling from source with pip install pyzmq should work in most environments.Especially on OS X, make sure you are using the latest pip (≥ 8), or it may not find the right wheels.

Osx Npm Install Permission Denied

If the wheel doesn’t work for some reason, or you want to force pyzmq to be compiled(this is often preferable if you already have libzmq installed and configured the way you want it),you can force installation with:

pip install –no-binary=:all: pyzmq

When compiling pyzmq (e.g. installing with pip on Linux),it is generally recommended that zeromq be installed separately,via homebrew, apt, yum, etc:

sudo apt-get install libzmq3-dev

sudo yum install libzmq3-devel

If this is not available, pyzmq will try to build libzmq as a Python Extension,though this is not guaranteed to work.

Building pyzmq from the git repo (including release tags on GitHub) requires Cython.

Installation

Install libzmq.

Mac install npm without xcode

If the gem installation complains that it cannot find libzmq or headers, simply pass the location of your libzmq installation to the gem install command:

On Windows add a parameter for the libs. For example:

rust-zmq is available from crates.io. Usersshould add this to their Cargo.toml file:

As rust-zmq is a wrapper around libzmq, you need a build of libzmqversion 4.1 or newer, before attempting to build the zmqcrate. There are several options available:

Dynamic linking using pkg-config

This is probably the preferred method when you are running a recentUnix-like OS that has support for pkg-config. For example, on recentDebian-based distributions, you can use the following command to getthe prerequiste headers and library installed:

Permission

If your OS of choice does not provide packages of a new-enough libzmq,you can install it from source; seehttps://github.com/zeromq/libzmq/releases, although in this case,you may prefer a vendored build, which automates that, see below.

The build normally uses pkg-config to find out about libzmq’slocation. If that is not available, the environment variableLIBZMQ_PREFIX (or alternatively, LIBZMQ_LIB_DIR andLIBZMQ_INCLUDE_DIR) can be defined to avoid the invocation ofpkg-config.

Windows build

Mac Install Npm Globally

When building on Windows, using the MSCV toolchain, consider thefollowing when trying to link dynamically against libzmq:

  • When building libzmq from sources, the library must be renamedto zmq.lib from the auto named libzmq-v***-mt-gd-*_*_*.lib,libzmq.lib, libzmq-mt-*_*_*.lib, etc.
  • The folder containing the *.dll (dynamic link library)referred to by zmq.lib must be accessible via the path forthe session that invokes the Rust compiler.
  • The name of the *.dll in question depends on the build systemused for libzmq and can usually be seen when opening zmq.libin a text editor.

Vendored build

Starting with the upcoming release 0.9.1 (or when building fromcurrent master), you can enable the vendored feature flag to havelibzmq be built for you and statically linked into your binarycrate. In your Cargo.toml, you can give users the option to do sousing a dedicated feature flag:

Osx Install Npm Command

Cross-compilation

When you have a cross-compiled version of libzmq installed, youshould be able to cross-compile rust-zmq, assuming a platformsupporting pkg-config. For example, assuming you have libzmqcompiled for the i686-pc-windows-gnu target installed in~/.local-w32, the following should work:

Mac Install Npm Homebrew

Cross compilation without pkg-config should work as well, but youneed set LIBZMQ_PREFIX as described above.