I don't know how it got this bad. I'm a web developer, and I use Ubuntu, and here are just some of the package managers I'm using.
我不知道这是怎么回事。我是一名Web开发人员,我使用Ubuntu,这里只是我正在使用的一些包管理器。
- apt-get for system-wide packages
- npm for node packages
- pip for python packages
- pip3 for python 3 packages
- cabal for haskell packages
- composer for php packages
- bower for front-end packages
- gem for ruby packages
- git for other things
apt-get用于系统范围的包
节点包的npm
pip for python包
pip3 for python 3包
haskell包的cabal
用于php包的composer
凉亭用于前端包装
宝石用于红宝石包装
git for other things
When I start a new project on a new VM, I have to install seemingly a dozen package managers from a dozen different places, and use them all to create a development environment. This is just getting out of control.
当我在新VM上启动一个新项目时,我必须安装来自十几个不同地方的十几个包管理器,并使用它们来创建一个开发环境。这只是失控。
I've discovered that I can basically avoid installing and using pip/pip3 just by installing python packages from apt, like sudo apt-get install python3-some-library
. This saves from having to use one package manager. That's awesome. But then I'm stuck with the Ubuntu versions of those packages, which are often really old.
我发现我基本上可以通过从apt安装python包来避免安装和使用pip / pip3,比如sudo apt-get install python3-some-library。这节省了必须使用一个包管理器。棒极了。但后来我坚持使用这些软件包的Ubuntu版本,这些版本通常很旧。
What I'm wondering is, is there a meta-package manager that can help me to replace a few of these parts, so my dev environment is not so tricky to replicate?
我想知道的是,是否有一个元包管理器可以帮助我替换其中的一些部分,所以我的开发环境不是那么难以复制?
1 个解决方案
#1
I had a thought to make a package manager to rule them all for that very reason. Never finished it though, too much effort required to stay compatible. For each package manager you have a huge community supporting it's upkeep.
我有一个想法是让一个包管理器为了这个原因而统治它们。从来没有完成它,需要太多的努力来保持兼容。对于每个包管理器,您都有一个庞大的社区来支持它的维护。
Best advice I have is to try to reduce your toolchain for each type of project. Ideally you shouldn't need to work in every language you know for each project you work on. How many projects are you using that use both python 2 and python 3 simultaneously?
我最好的建议是尝试减少每种类型项目的工具链。理想情况下,您不需要为您所工作的每个项目使用您熟悉的每种语言。你使用了多少个同时使用python 2和python 3的项目?
Keep using apt
for your system packages and install git
with it. From there try to stick to one language per project. AFAIK all of the package managers you listed support installing packages from git
. The languages you mentioned all have comparable sets of tooling, so use the toolchain available for the target language.
继续使用apt为您的系统包,并使用它安装git。从那里尝试坚持每个项目一种语言。 AFAIK您列出的所有软件包管理器都支持从git安装软件包。您提到的语言都具有可比较的工具集,因此请使用可用于目标语言的工具链。
I worked with a team that was using composer
, npm
, bower
, bundler
, maven
, and a tar.gz
file for frontend SPAs because those are the tools they knew. On top of all of that, they were using vagrant
simply as a deployer. We considered our toolchain and described our need and realized that it could be expressed in a single language once we adopted appropriate tooling for the task at hand.
我曾与一个使用composer,npm,bower,bundler,maven和tar.gz文件的团队一起工作,因为这些是他们所知道的工具。最重要的是,他们只是将流浪者用作部署者。我们考虑了我们的工具链并描述了我们的需求,并意识到一旦我们为手头的任务采用了适当的工具,它就可以用一种语言表达。
#1
I had a thought to make a package manager to rule them all for that very reason. Never finished it though, too much effort required to stay compatible. For each package manager you have a huge community supporting it's upkeep.
我有一个想法是让一个包管理器为了这个原因而统治它们。从来没有完成它,需要太多的努力来保持兼容。对于每个包管理器,您都有一个庞大的社区来支持它的维护。
Best advice I have is to try to reduce your toolchain for each type of project. Ideally you shouldn't need to work in every language you know for each project you work on. How many projects are you using that use both python 2 and python 3 simultaneously?
我最好的建议是尝试减少每种类型项目的工具链。理想情况下,您不需要为您所工作的每个项目使用您熟悉的每种语言。你使用了多少个同时使用python 2和python 3的项目?
Keep using apt
for your system packages and install git
with it. From there try to stick to one language per project. AFAIK all of the package managers you listed support installing packages from git
. The languages you mentioned all have comparable sets of tooling, so use the toolchain available for the target language.
继续使用apt为您的系统包,并使用它安装git。从那里尝试坚持每个项目一种语言。 AFAIK您列出的所有软件包管理器都支持从git安装软件包。您提到的语言都具有可比较的工具集,因此请使用可用于目标语言的工具链。
I worked with a team that was using composer
, npm
, bower
, bundler
, maven
, and a tar.gz
file for frontend SPAs because those are the tools they knew. On top of all of that, they were using vagrant
simply as a deployer. We considered our toolchain and described our need and realized that it could be expressed in a single language once we adopted appropriate tooling for the task at hand.
我曾与一个使用composer,npm,bower,bundler,maven和tar.gz文件的团队一起工作,因为这些是他们所知道的工具。最重要的是,他们只是将流浪者用作部署者。我们考虑了我们的工具链并描述了我们的需求,并意识到一旦我们为手头的任务采用了适当的工具,它就可以用一种语言表达。