Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have downloaded a Debian package lxde, together with all its dependencies:

apt-get install --no-install-recommends lxde --download-only

So now, I have all packages in my /var/cache/apt/archives. I have made modifications to one package lxde_4+nmu1_all.deb (removed galculator from dependencies) and now I would like to install lxde from my modified package (i.e. with the modified dependencies). dpkg -i lxde_4+nmu1_all.deb does not work, because of unmet dependencies.

How can I tell apt-get to install my modified package /var/cache/apt/archives/lxde_4+nmu1_all.deb ?

share|improve this question
2  
Create a repo of your own, give it a higher version number (and/or a higher pin) and verify with apt-cache policy lxde that your version is now preferred. –  tripleee May 30 '13 at 14:59
    
that would be an elegant solution. How would I create my own repo, by the way? Is it just the path to the files, i.e. /var/cache/apt/archives ? –  user1968963 May 30 '13 at 16:43
    
No, it's somewhat more complex than that. You will need at least a Packages file (see dpkg-scanpackages) and these days probably a signing key. –  tripleee May 30 '13 at 17:00
    
Why not just go ahead and install the dependencies first? they are listed in apt-cache show for example. –  Faheem Mitha May 30 '13 at 17:46

2 Answers 2

up vote 1 down vote accepted

You can make your own repository with reprepro (tutorials 1 2 …).

If all you want to do is avoid installing galculator, an easier method is to make a fake galculator package with equivs. Then you can install lxde normally.

share|improve this answer

After installing the package via dpkg --force-depends, you can install the dependencies and complete installation with apt-get install -f. This will only work in the case of "Depends". If a package is a "Pre-Depend", it must be installed prior to using dpkg -i.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.