0

is it possible to install a package from source? For example whether debian or opensuse, would it be possible to install an existing package say nginx from source? The reason is that i want to try compiling with optimisations but using source code from the package manager instead. I've had very poor success downloading source code and compiling them. Opensuse has newer stable packages while debian uses old stable packages and they each have their advantages when renting a VPS but its been many years since i managed to compiler software from source successfully as this is a process i've always been unable to do. Only recently while helping software developers did i realise that installing from source can be done with optimisations for specific platforms.

Both OSes have a source branch so if its source code i'm hoping to install from source from there instead of the software's public repositories.

3
  • I'm sorry, I don't fully understand your question. Do you want to build a package from source, or just install from source on one machine? Both are possible, depending on the software.
    – shearn89
    Commented Mar 3, 2022 at 11:46
  • 1
    I want to build a package from source and install it on the same machine, but i would like to use the source from the OS source package repository and add optimisation options. Commented Mar 3, 2022 at 12:07
  • Please edit your question to add: what optimizations you intend to add (compiler options?), and what specific problems you have successfully building. Commented Mar 4, 2022 at 14:47

2 Answers 2

1

Generally speaking, you can install any package from the source (nginx, apache, squid-cache, etc) and customize installation parameters, but in this case, you're supposed to do it from developer's source, not from debian's or opensuse's source.

Bear in mind each package might require a different way (commands and requirements) to be installed. In case of any questions about how to install a specific package, always prefer talking to the package's authors and/or community.

0

Usually the upstream install from source instructions are generic and will not generate a deb or rpm. On a system with a software package management system, installing things external to that is difficult to maintain, and not recommended. When discussing nginx on Debian, people will assume you are using packages and there will be much confusion. Plus it will not be visible to tools that inventory software packages.

Learn how to rebuild packages for your chosen system. For Debian, a starting point is the packaging tutorial from the developer manuals. From the dashboard of say the nginx package you can find the package in version control. Increment the version in a changelog entry. Make your changes, possibly debian/rules Makefile or apply some patches. Build. Distribute these for installation via a custom apt repository.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .