EzDevInfo.com

package-management interview questions

Top package-management frequently asked interview questions

Installing Nuget Packages globally

Is there a way to install Nuget Packages globally?

I have a Nuget Package that I would like to use across multiple projects without having to download for each project?

Each project will have its own solution and it will be independent of other project.


Source: (StackOverflow)

How to find where a package is installed by pacman?

I'm installing c++ boost library by pacman -Ss boost-libs. After installation, I want to know where my package is installed in my system.

Is there any pacman command for doing so?


Source: (StackOverflow)

Advertisements

How to reset Haskell package cache

Deciding to learn Haskell, installed ghc on OS X via Homebrew (web binaries weren't downloading at the time).

All great, following along with Learn You a Haskell, but then decided to install some packages and see how things run.

cabal install clckwrks-cli was running fine until...

Public internet craps out half-way through install/build of a few projects.

Now, none of those programs will reinstall and in the case of clckwrks-cli, I get the following error:

$ cabal install clckwrks-cli --reinstall --force-reinstalls
Resolving dependencies...
Failed to install cipher-aes-0.2.6
Failed to install cipher-rc4-0.1.4
Failed to install cookie-0.4.0.1
Failed to install crypto-numbers-0.2.3
Configuring happstack-hsp-7.2.4...
Building happstack-hsp-7.2.4...
Preprocessing library happstack-hsp-7.2.4...
ghc: could not execute: hsx2hs
Failed to install happstack-hsp-7.2.4
Failed to install lifted-base-0.2.2.0
Failed to install publicsuffixlist-0.1
Failed to install pwstore-purehaskell-2.1.1
Configuring reform-hsp-0.2.4...
Building reform-hsp-0.2.4...
Preprocessing library reform-hsp-0.2.4...
ghc: could not execute: hsx2hs
Failed to install reform-hsp-0.2.4
Failed to install web-plugins-0.2.5
Failed to install wl-pprint-text-1.1.0.2
Failed to install xml-types-0.3.4
cabal: Error: some packages failed to install:
attoparsec-conduit-1.0.1.2 depends on lifted-base-0.2.2.0 which failed to
install.
authenticate-1.3.2.6 depends on xml-types-0.3.4 which failed to install.
blaze-builder-conduit-1.0.0 depends on lifted-base-0.2.2.0 which failed to
install.
cipher-aes-0.2.6 failed while unpacking the package. The exception was:
user error (data is not in tar format)
cipher-rc4-0.1.4 failed while unpacking the package. The exception was:
user error (data is not in tar format)
clckwrks-0.21.1 depends on xml-types-0.3.4 which failed to install.
clckwrks-cli-0.2.10 depends on xml-types-0.3.4 which failed to install.
conduit-1.0.14 depends on lifted-base-0.2.2.0 which failed to install.
cookie-0.4.0.1 failed while unpacking the package. The exception was:
user error (data is not in tar format)
cprng-aes-0.5.2 depends on cipher-aes-0.2.6 which failed to install.
crypto-numbers-0.2.3 failed while unpacking the package. The exception was:
user error (data is not in tar format)
crypto-pubkey-0.2.4 depends on crypto-numbers-0.2.3 which failed to install.
fb-0.14.11 depends on publicsuffixlist-0.1 which failed to install.
happstack-authenticate-0.10.10 depends on xml-types-0.3.4 which failed to
install.
happstack-hsp-7.2.4 failed during the building phase. The exception was:
ExitFailure 1
hsx-jmacro-7.3.4 depends on wl-pprint-text-1.1.0.2 which failed to install.
http-conduit-1.9.6 depends on publicsuffixlist-0.1 which failed to install.
jmacro-0.6.8 depends on wl-pprint-text-1.1.0.2 which failed to install.
lifted-base-0.2.2.0 failed while unpacking the package. The exception was:
user error (data is not in tar format)
monad-logger-0.3.4.0 depends on lifted-base-0.2.2.0 which failed to install.
publicsuffixlist-0.1 failed while unpacking the package. The exception was:
user error (data is not in tar format)
pwstore-purehaskell-2.1.1 failed while unpacking the package. The exception
was:
user error (data is not in tar format)
reform-hsp-0.2.4 failed during the building phase. The exception was:
ExitFailure 1
resourcet-0.4.10 depends on lifted-base-0.2.2.0 which failed to install.
tls-1.1.5 depends on crypto-numbers-0.2.3 which failed to install.
tls-extra-0.6.6 depends on crypto-numbers-0.2.3 which failed to install.
web-plugins-0.2.5 failed while unpacking the package. The exception was:
user error (data is not in tar format)
wl-pprint-text-1.1.0.2 failed while unpacking the package. The exception was:
user error (data is not in tar format)
xml-conduit-1.1.0.9 depends on xml-types-0.3.4 which failed to install.
xml-types-0.3.4 failed while unpacking the package. The exception was:
user error (data is not in tar format)
zlib-conduit-1.0.0 depends on lifted-base-0.2.2.0 which failed to install.

Same issue with a few other projects that suffered same network outage mid-install.

Loving the language so far, NOT the package management :(


Source: (StackOverflow)

Is there a project file support like npm/package.json for Python's pip?

I just started working on a project where I needed to install a lot of dependencies via pip. The instructions were to do everything manually.

I've used nodejs and maven before where this process is automated and the dependencies are isolated between projects. For example in node I can configure everything in package.json and just run npm install ik my project directory.

Is there something similar for pip?


Source: (StackOverflow)

How to save password in SSIS package configuration using Visual Studio 2005 BIDS?

I know this isn't a "good" thing to do, but its also a temporary measure on several internal servers used by a select few developers. So please forgive me engaging in "very bad things" :)

The crux of the problem can be seen when I open any of my connection managers: the password field is empty. I am using SQL Server Authentication with SS 2005 and VS 2005 BIDS. So, is it even possible to save passwords in an XML package configuration (*.dtsConfig) and maintain them across machines and servers unencrypted?

Thanks for all for the help!


Source: (StackOverflow)

.NET Package Management

What are the current offerings for .NET package management. Which are you using and what are the pros and cons?

Some examples out there today are:

For the avoidance of doubt, I'm referring to package management systems such as gem, apt-get, and dpkg.


Source: (StackOverflow)

Force python2.7 setup.py install to python2.7 not python2.6

I'm trying to install python packages to the python2.7 site-packages folder but it puts some of them in the python2.6 site-packages folder.

I've read this and can't get my head round how to solve this. It's driving me nuts!

I've consistently been using python2.7 (/usr/local/bin/python2.7 setup.py install) to install different packages, and the logs for one say it's gone into .../python2.6/site-packages and others go into .../python2.7/site-packages

Please can someone straighten me out here?


Source: (StackOverflow)

Split requirements files in pip

To create Python virtual environments I use virtualenv and pip. The workflow is very simple:

$ virtualenv project
$ cd project
$ . bin/activate
$ pip install -r /path/to/requirements/req1.txt
$ pip install -r /path/to/requirements/req2.txt

The number of different requirement files can grow enough to make handy to have a way to include them at once, so I'd rather prefer to say:

$ pip install -r /path/to/requirements/req1_req2.txt

with req1_req2.txt containing something like:

include /path/to/requirements/req1.txt
include /path/to/requirements/req2.txt

or otherwise:

$ pip install -r /path/to/requirements/*.txt

None of that works and however much simple it could be, I can't figure out how to do what I want.

Any suggestion?


Source: (StackOverflow)

How to install a package using stack?

Using cabal, I could install hakyll with the command:

cabal install hakyll

How can I do the same thing using stack?


Source: (StackOverflow)

Allow use of system python in conda env?

Is there a way to force conda to use the system version of python (along with all of the system libraries) in a given env?

I have conda enabled by default in my shell, which can get a bit annoying, because if I try to run a system python app, it gets a different version of python to what it is expecting (python still defaults to 2.7 on *buntu), and often won't run. I would like the root env of conda to just be a redirect to the system python install.


Source: (StackOverflow)

Package management running R on a shared server

some background: I'm a fairly beginning sysadmin maintaining the server for our department. The server houses several VM's, mostly Ubuntu SE 12.04, usually with a separate VM per project.

One of the tools we use is R and RStudio, also server edition. I've set this up so everyone can access it through their browser, but I'm still wondering what the best way would be to deal with package management. Ideally, I will have one folder/library with our "common" packages, which are common in many projects and use cases. I would admin this library, since I'm the only user in sudo. My colleagues should be able to add packages on a case-by-case basis in their "personal" R folders, that get checked as a backup in case a certain package is not available in our main folder.

My question has a few parts: - Is this actually a viable way to set this up? - How would I configure this? - Is there a way to easily automate this library for use in other VM's?

I have a similar question pertaining to Python, but maybe I should make a new question for that..


Source: (StackOverflow)

how to create a debian package using “equivs-build” which can be “upgraded” if already installed?

I have created a .deb package using equivs-build command and providing necessary control, preinst, postinst, etc. I noticed that version can also be mentioned in control file. Now I want to create a .deb package with updated source code and I want to enable user to upgrade the package if it is already installed (and is of previous version, of course), as I won't be changing conf related files, etc. One way I can think of is to write a shell-script which will first check for installed version, and will take actions accordingly (i.e. if installed, just update the source-code, database-migrations, etc. and if not, install the package using dpkg -i <package-name>). I was wondering if there was a way to achieve using dpkg only (something like dpkg upgrade <package-name>) which will handle installation or up-gradation as required.


Source: (StackOverflow)

Why does this script resource not install Chocolatey packages?

I'm trying to write a desired state configuration that installs a package via PackageManagement (aka OneGet). The package, "notepadplusplus", comes from the Chocolatey repository but I want to use PackageManagement rather than the Chocolatey client. I couldn't find a DSC resource to do it, so I'm using a Script resource.

DSC runs without errors and Notepad++ shows up in the packages list but never actually gets installed (Notepad++.exe is nowhere on the system).

I'm running on a Windows 10 VM.

Here's a simplified example of what I'm doing. Anyone spot what I'm doing wrong?

dscConfig.ps1

Configuration BuildProvisioning
{
    param(
        [string[]]$computerName="localhost"
    )
    Import-DscResource -ModuleName PSDesiredStateConfiguration

    Node $computerName
    {
        Script PackageManagementTest
        {
            SetScript = {
                Get-PackageProvider NuGet -Force | Out-Null
                Get-PackageProvider Chocolatey -Force | Out-Null
                Install-Package notepadplusplus -Force
            }
            TestScript = { $false }
            GetScript  = { @{} }
        }
    }
}

And here is how I'm kicking it off on the VM

. .\dscConfig.ps1
BuildProvisioning
winrm quickconfig -quiet
Start-DscConfiguration -Verbose -Force -Wait -ComputerName "localhost" -Path ".\BuildProvisioning\"

Source: (StackOverflow)

Resolution for conflicting 'Provides' in RPM spec

Consider a situation where there are different rpms that provide the same capability. A hypothetical example would be let Oracle JDK rpm, Oracle JRE rpm,and OpenJDK rpm all have "java-env" listed in the "Provides" field in their SPEC files. Now we have rpms like ant, groovy, maven all having the "Requires" field set to "java-env" in their SPEC files. What gets installed when an attempt is made to install groovy or maven? In what ways can we control what dependency gets installed? I think one way would be to put Oracle JDK rpm, Oracle JRE rpm,and OpenJDK all in different repositories and set priorities on the repositories, but in this way the number of repos may continue to grow as I have several of these kinds of conflicts.


Source: (StackOverflow)

DPKG/APT-GET simulated install while "hiding" dependencies

I have some .deb files which I am currently modifying to have varying dependencies in the control file within the archive. I would like to be able to do simulated installations via:

sudo dpkg --install --simulate ./myFile.deb

The install script is meant to exercise some varying logging capabilities depending on certain combinations of dependency mismatches, etc. For example, one of my packages depends on the presence of libusb-1.0-0 > 1.0.0.16, and I already have the latest available version installed on my test system. Is it possible to pass a flag to dpkg so that it either:

  1. Thinks that libusb is either a different version than that which is currently installed.
  2. Thinks that libusb, or any other arbitrary library/package is not already installed.

Thank you.


Source: (StackOverflow)