How can I install a package without installing some dependencies?

1

I'm trying to install the package LaTeXila, and the output looks like this:

$ sudo apt-get install latexila --no-install-recommends Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: latexila-data latexmk luatex tex-common texlive-base texlive-binaries texlive-common texlive-doc-base texlive-latex-base Suggested packages: rubber texlive-latex-extra debhelper Recommended packages: texlive texlive-latex-recommended texlive-luatex lmodern texlive-latex-base-doc The following NEW packages will be installed: latexila latexila-data latexmk luatex tex-common texlive-base texlive-binaries texlive-common texlive-doc-base texlive-latex-base 0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded. Need to get 29.3 MB of archives. After this operation, 74.5 MB of additional disk space will be used. Do you want to continue [Y/n]?

I don't want to install the texlive packages. I've...

0 0
2

As some might know, I'm very against geoclue. And for some reason, it's listed as a dependency of so many Arch pacakges, instead of being a dependency of packages which actually need geolocation awareness.

I want to install a few packages that "depend" on geoclue and Co. How can I install these packages without installing geoclue, and without having to compile everything on my own? Pacman should be able to ignore some packages. I even set the "Ignore Pkg" line on pacman.conf, but this happens:

warning: mate-icon-theme-faenza-1.12.0-1 is up to date -- reinstalling resolving dependencies... warning: ignoring package geoclue2-2.4.1-1 warning: cannot resolve "geoclue2", a dependency of "webkit2gtk" warning: cannot resolve "webkit2gtk", a dependency of "zenity" warning: cannot resolve "zenity", a dependency of "marco" warning: ignoring package geoclue2-2.4.1-1 warning: cannot resolve "geoclue2", a dependency of "webkit2gtk" warning: cannot resolve "webkit2gtk", a dependency...
0 0
3

I don't consider myself a total noob, but compiling and installing software is a pain and problem I cannot overcome. I just want to run down through my understanding of this process with someone more knowledgeable to clear my mind to get to the next level.

Many scientific software I need are not distributed as packages. I understand "./configure" sets up the compilation variables and checking for dependencies "make" does the compilation "sudo make install" puts all the libraries and bins in their places. However it never works. I rarely get out of the a) "./configure" stage without entering dependency hell, and if I do, b) "sudo make install" will probably nuke my box.

a) The dependency hell is very frustrating. Sometimes I have the library, but it doesn't like it. Or the library doesn't want to install. Or "configure" can't find it. Or my distro placed it somewhere it shouldn't be. Or there are two versions in my system. Problem is, I can't understand how to diagnose...

0 0
4

Suppose I need to install a number of packages on a (Linux) machine that does not have an internet connection. Let’s say that I downloaded a copy of cran and burned it on a DVD that I bring to the offline location:

wget ftp://cran.r-project.org/pub/R/src/contrib/*.tar.gz

I can even add a PACKAGES file that contains an overview of all the source packages and their dependencies:

library(tools) write_PACKAGES()

How could I use this offline to install a source package in such a way that dependencies are resolved and installed from the local files as well? For example, someone wants to install package ggplot2, which has a fairly deep dependency structure. Assume the source package of ggplot2 and all of its dependencies are available as source packages in the current working directory. If I do:

install.packages("ggplot2_0.9.1.tar.gz", repos=NULL)

This results in an error, because the dependencies are not resolved at all. Alternatively:

...
0 0
5

All source code included in the card How to install a debian/ubuntu package without dependencies is licensed under the license stated below. This includes both code snippets embedded in the card text and code that is included as a file attachment. Excepted from this license are code snippets that are explicitely marked as citations from another source.

The MIT License (MIT) Copyright (c) 2011-2012 makandra GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS...
0 0
6

Sometimes, we may need to install programs on Ubuntu or Debian, but the installation may not be successful due to dependencies. It means the program won't be installed unless we install other programs to run normally.


If you want to exclude these dependencies and force install a program on Ubuntu or any other Debian-based system, then follow these instructions:

Open the Terminal and run one of these commands to force install a package:

sudo apt-get install --no-install-recommends package_name
or
sudo aptitude install --without-recommends package_name


Replace package_name with the name of the program you want to install. Using the second command, I managed to force install Mencoder and FFmpeg on Ubuntu 11.04.

Warning: Use these commands at your own risk! We are not liable for any damage that these commands may cause to your system.


Good...

0 0
7

I'm trying to install Alacarte and the dependencies are huge, basically all of GNOME. I know that they are unnecessary. Is there an option in Synaptic or an apt-get flag for this?

There are two kinds of dependencies for alacarte: “depends” and “recommends”.

Alacarte depends on Python and various Python libraries (which in turn pull in some libraries); the “depends” level says that alacarte won't work without these. APT-based tools won't let you install alacarte without those dependencies. You can ignore all dependencies with dpkg --force-depends, however this will confuse APT when alacarte is involved in a dependency calculation later (for example when a newer version of the package appears), hence doing this is not recommended. Furthermore it's unlikely that you'll get any use of the package without these dependencies.

Alacarte depends on gnome-panel (which in turns depends on many other parts of Gnome) at the “recommends” level. This indicates that alacarte...

0 0
8

Simple and easy solution: just specify the unwanted packages with an extra - after each of them.

Example without the - switch:

root@debian:~# apt-get install bsd-mailx Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: exim4-base exim4-config exim4-daemon-light liblockfile-bin liblockfile1 [...]

Example using the switch to avoid installing exim4-base. Notice the - at the end:

root@debian:~# apt-get install bsd-mailx exim4-base- Reading package lists... Done Building dependency tree Reading state information... Done Package 'exim4-base' is not installed, so not removed The following extra packages will be installed: liblockfile-bin liblockfile1 ssmtp [...]

As you can see, apt-get does not try anymore to install the exim4-base package, and it does not try to install its various dependencies (exim4-config etc).

And if you were wrong and needed that exim4-base...

0 0
9


Question:

Software Center somehow shows quite short list of installed packages. How to get it in text file?

I tried:

> dpkg --get-selections|wc -l 3265 > aptitude search '~i!~M'|wc -l 1181 > dpkg -l | grep ^ii | sed 's_ _\t_g' | cut -f 2|wc -l 3076 > dpkg --get-selections | grep -v deinstall|wc -l 3076 > apt-mark showmanual|wc -l 1181

I know that I've installed few dozens packages, not thousands. I need in the list exactly packages I'd choosen without dependencies to review it.

UPDATE

Many thanks to @kos, I got finally the list with that command:

> zcat /var/log/apt/history.log.*.gz | cat - /var/log/apt/history.log | grep -Po '^Commandline: apt-get install \K.*' | tr ' ' '\n' | grep -v '\-\-reinstall'|grep -v '\-\-force-yes'|grep -v '\-y'|grep -v '\-f'|sort|uniq wc -l 103


Solution:1

This doesn't answer the question exactly: it rather gives a command to list all the apt-get install commands ever...

0 0
10

Hey @RachidLaasri, thanks for your reply.

I tried that earlier but it didn't appear to work at that time - so I assume I had done it wrong.

So I'm requiring guzzlehttp/guzzle with my package, I then did a composer install which installed them in a vendor folder in my package (now ignored as you recommend). I can definitely see the package in there now.

In my package, I have a file named AmazonProducts of which I added the use to the top for guzzle.

// Location // /packages/Dawson/AmazonProducts/src/AmazonProducts.php namespace Dawson\AmazonProducts; use GuzzleHttp\Client; class AmazonProducts { protected $client; public function __construct() { $this->client = new Client; } public function search($query) { $res = $this->client->request('GET', '/api/products'); return $res; } }

Just as a tester, I'm trying to make a GET request on an API route that already exists in my project. But I'm getting an error saying GuzzleHttp\Client...

0 0
11
...
0 0
12

Most good GUIs like Synaptics will allow you to do this. It is probably easier and safer to do this from a command line however. It's really easy to forget that you told the GUI NOT to install, and then keep running updates that are never installed.

How to download all dependencies and packages to directory

This link has several workable solutions to what you want to do. I'll assume you want to create your own mirror, thus download them once and then use a local machine to distribute updates to the rest of your machines in the network rather than eat up a ton of bandwidth installing to each and every machine.

How to make my own local repository?

Has some good information on creating a local repository.

All of these require some scripting. What YOU specifically use is going to be different and it's important that if you install a package on one machine, it's installed on your mirror. You do not want to mirror EVERY package in the Ubuntu...

0 0
13

I am using composer with symfony php.

There is one bundle A which has dependency on Another bundle B v 1.1.

But I have the latest version of bundle B v 2.

Now I want to install bundle A without installing its dependency bundle B v 1.1.

How do I proceed ? Please suggest.

setup:

The latest ladybug-bundle version is 1.0.2 but there have meanwhile been some more commits. It requires ladybug version is 1.0.8 which doesn't include the latest changes aswell.

solution:

An easy solution would be using an inline-alias. Something like:

"require" : { "raulfraile/ladybug-bundle": "dev-master as 1.0.3" "raulfraile/ladybug": "dev-master as 1.0.9" }

alternative:

You can define a package with the same name in your composer.json that includes the altered dependency.

Just copy the package definition from the original package, add the dist/source locations and edit the requirements.

composer will then use this new...

0 0