Code Monkey home page Code Monkey logo

apt-local-install's Introduction

apt-local-install (aptli)

Tool for installing apt packages without root permission in local space.

Getting Started

To use aptli, there are a few requirements (but should be satisfied in almost all use cases of the program):

  1. The script is written in Python. You will need a python3 available in the system.
  2. aptli depends on apt-get, ldconfig and dpkg. These should come with all linux systems with apt.
  3. aptli does not fetch apt registries by now, and the system need to have an up-to-date apt registry. An apt update needs to be done by the system admin beforehand. This should always be okay on a system under maintenance.

Then, clone the repository or copy the contents of aptli to some local file. If you have wget on your system you can do that by:

wget https://raw.githubusercontent.com/eliphatfs/apt-local-install/main/aptli
chmod 755 ./aptli

Execute it to configure aptli:

./aptli

aptli will configure itself. You probably need to do either of these before the configurations come into effect:

  1. Re-login (or re-enter the bash shell at least) into the system.
  2. source ~/.bashrc in the running shell.

Now, you can install packages without root permission by:

aptli <package-name> [<package-name> ...]

The package will be installed under ~/.local/. You may also specify a .deb file at the <package-name> to install the package file.

To update the configured aptli with a new aptli downloaded from this repository, you can call

./aptli --upgrade-aptli

To remove a package installed with aptli, call

aptli --remove <package-name>

Why aptli

I have met it a lot of times when I need to install a package on a system where I am not a sudo-er. Moreover, the package is not for general use so it is better to install user-wise instead of system-wise. We may build from the source or extract .deb files manually. But this is a nasty and time-consuming process if some of the dependencies and the dependencies of the dependencies are not available on the system either. As a result, I made aptli, to install packages locally without sudo permission.

How aptli works

aptli configures .bashrc so the executables in relevant folders in .local could be found by the system command line and the shared libraries could be loaded by the system linker (ld). It reads and parses .deb files, automatically finds and handles the dependencies, and downloads required packages with apt-get download.

Future

  • More CI test cases for the tool.
  • Setup for include files/-dev packages.
  • Virtual packages.
  • Try to support triggers and custom install configuration scripts.
  • Version resolution and conflict resolution.
  • Different verbose levels.
  • Parsing repository index.

apt-local-install's People

Contributors

eliphatfs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

apt-local-install's Issues

Fails to meet a common use case by needing a re-login.

A common use case for such a tool would be to allow compilation of builds to pass where dependencies need to be installed with sudo (and docker is not available).

However the requirement to close and open a new shell trashes that as that would break a running script.

Suggesion: Something like source the .bashrc into the current shell environment

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.