Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to install and keep composer / npm up to date with Debian9

Shulou Source: shulou.com Published: 2022-06-02 04:06:08 10月01日 Update

This article mainly explains "how to install Debian9 and keep composer / npm up-to-date". The explanation in this article is simple and clear and easy to learn and understand. please follow the editor's train of thought to study and learn "how to install Debian9 and keep composer / npm up-to-date".

Debian9 installs and keeps composer / npm up to date

Quote from: https://blog.doylee.cn/debian9-composer-npm-latest/ 's blog of teeth of troubled Times

In order to ensure stability, Debian takes a conservative attitude towards the package version. If you want to update composer and npm to the latest version, you can use the stretch source in / etc/apt/source.list as testing (beta version), but this will reduce the stability of the system.

It is recommended that on the basis of using the stable version, by adding ppa, continue to use apt management npm; to provide the version by downloading and installing composer directly on the official website, and then update it with your own composer self-update.

Node.js/NPM 1. Manage by adding ppa and then using apt. 1. The latest version

First, go to the official website to query the latest version number, which is currently 10.7.0, and then execute the following command, and change the version number in the command to the corresponding version number. I am currently in version 10.*, so my command is:

Curl-sL https://deb.nodesource.com/setup_10.x | sudo-E bash-sudo apt-get install-y nodejs2, stable version

Similarly, first go to the official website to check the latest stable version number, which is currently 8.11.3 LTS, so my command is:

Curl-sL https://deb.nodesource.com/setup_8.x | sudo-E bash-

Sudo apt-get install-y nodejs × optional: replace it with npm Taobao image to ensure the domestic use speed of sudo npm config set registry http://registry.npm.taobao.org/ update large version, need to re-add ppa to the latest, / etc/apt/source.list.d/ will be automatically synchronized update second, update through the npm command

Connect, and the command you use is

Sudo npm install-g npmComposer

Unlike npm, composer does not need to be managed with apt, but composer self-update when updates are needed.

Php-r "copy ('https://install.phpcomposer.com/installer',' composer-setup.php');" php composer-setup.phpphp-r "unlink ('composer-setup.php') Sudo mv composer.phar / usr/local/bin/composer Thank you for reading, this is the content of "how to install and keep composer / npm up-to-date on Debian9". After the study of this article, I believe you have a deeper understanding of how to install and keep composer / npm up-to-date on Debian9, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Version command update learning management content latest version stability guarantee query different troubled times practices blog can be passed basic that is attitude ideas situation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info NVidia Shulou Information vpn Xiaomi