Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm attempting to apt-get install fglrx while runnning a custom kernel, and the process is failing when it tries to compile the kernel module. I found a patch on the net that should take care of my problem. How do I apply it to a package fetched via apt-get?

I already know how to extract source files from AMD's install program, patch them, and create .deb packages. That's not what I'm asking here. I'm not using AMD's installer.

Is there an apt cache somewhere? Can I edit it? How do I tell dpkg to unpack a package so I can edit what's inside? How do I re-package it afterwards?


share|improve this question

While you can't patch a proprietary program like fglrx (that's why I don't like them) I assume the patch probably goes into the part that isn't proprietary, namely the part that ties the driver to the kernel. (otherwise you wouldn't have been able to find a patch for it).

Please see How to download, modify, build and install a Debian source package? for basic instructions.

There are also guides available. See this AskUbuntu answer for pointers. I have found the IRC chatrooms mentioned particularly helpful.

share|improve this answer

Your Answer


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.