Package managers are commonly used in software development in order to benefit from existing dependencies such as open-source libraries. npm is our favorite tool at Promyze. While developers often use associated manifest files to list external dependencies, they can also use the command line version to install a dependency. Common questions in such cases: how to install a specific version of a library? Should we use symbols such '@', '^', '=' or something else?
This post is a quick reminder for how to achieve that for several package managers.
APK (Alpine)
apk add mysql-client=10.5.11-r0
APT (Ubuntu/Debian)
apt-get install mysql-client=8.0.19-0ubuntu5
Composer (PHP)
composer require amphp/mysql:2.1.0
Gem (Ruby)
gem install mysql -v 2.9.0
Go Modules (Go)
go get -u github.com/go-sql-driver/mysql@v1.6.0
Npm (JavaScript/Typescript)
npm install mysql@2.18.1
Nuget (.NET)
nuget install MySql.Data -Version 8.0.26
Pip (Python)
pip install mysqlclient==1.4.0
Yarn (JavaScript/Typescript)
yarn add mysql@2.18.1
Feel free to comment to add your suggestions, we'd be glad to update the post !
Top comments (0)