Giter Club home page Giter Club logo

notroot's Introduction

Not root, install APT packages without root access

Notroot

This simple tool allow you to install apt packages without root access.

Installing

First, clone this repository:

git clone https://github.com/Gregwar/notroot.git

Then, add this line to your .bashrc file:

source "$HOME/notroot/bashrc"

(You can adapt the path to the notroot directory)

Then, reload bash.

Usage

Simply run something like this:

notroot install libjsoncpp-dev libjsoncpp0

This will download and extract packages.

Support

Note that this is a minimalist script designed to install libraries and binaries without root access, the following are supported:

  • Binaries (using PATH)
  • Includes (using CPATH)
  • Libraries (using LIBRARY_PATH and LD_LIBRARY_PATH)

notroot's People

Contributors

crazypython avatar fwarmuth avatar gregwar avatar moetayuko avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

notroot's Issues

Not Working

Error Report:

otroot install vim
[NOTROOT] Installing vim from yum...
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
  File "/bin/yumdownloader", line 283, in <module>
    util = YumDownloader()
  File "/bin/yumdownloader", line 79, in __init__
    self.main()
  File "/bin/yumdownloader", line 108, in main
    self.doUtilYumSetup(opts)
  File "/bin/yumdownloader", line 249, in doUtilYumSetup
    self._getRepos(doSetup = True)
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 721, in _getRepos
    self._repos.doSetup(thisrepo)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 122, in doSetup
    self.ayum.plugins.run('prereposetup')
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 202, in prereposetup_hook
    all_urls = FastestMirror(all_urls).get_mirrorlist()
  File "/usr/lib/yum-plugins/fastestmirror.py", line 369, in get_mirrorlist
    self._poll_mirrors()
  File "/usr/lib/yum-plugins/fastestmirror.py", line 413, in _poll_mirrors
    pollThread.start()
  File "/usr/lib64/python2.7/threading.py", line 747, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

How to install all dependencies?

Hey,
1st:
well done!
2nd - the problem
For example i want to install Firefox. Firefox needs additional libraries, but notroot does not get them automatically... see the below history. I can do it by hand but it seems that task can be automated...

 $ notroot install firefox
 Installing firefox from apt...
 Get:1 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [1511 B]
 Get:2 http://mirror.kamp.de/ubuntu bionic-updates/main amd64 firefox amd64  73.0+build3-0ubuntu0.18.04.1 [51.8 MB]
 Fetched 51.8 MB in 3s (20.0 MB/s)  
 $ firefox
 XPCOMGlueLoad error for file /XXXXX/notroot/usr/lib/firefox/libxul.so:
 libstartup-notification-1.so.0: cannot open shared object file: No such file or directory
 Couldn't load XPCOM.

Is it possible to install all dependencies automatically?
Workaround would be to install them by hand:

$ notroot install libstartup-notification0
Installing libstartup-notification0 from apt...
Get:1 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [1511 B]
Get:2 http://mirror.serverloft.eu/ubuntu/ubuntu bionic/main amd64 libstartup-notification0 amd64 0.12-5 [18.9 kB]
Fetched 20.4 kB in 0s (124 kB/s)               
$ firefox
XPCOMGlueLoad error for file /XXXXX/notroot/usr/lib/firefox/libxul.so:
libxcb-util.so.1: cannot open shared object file: No such file or directory
Couldn't load XPCOM.
$ notroot install libxcb-util1
Installing libxcb-util1 from apt...
Get:1 http://mirrors.ubuntu.com/mirrors.txt Mirrorlist [1511 B]
Get:2 http://ftp.halifax.rwth-aachen.de/ubuntu bionic/main amd64 libxcb-util1 amd64 0.4.0-0ubuntu3 [11.2 kB]
Fetched 12.7 kB in 0s (44.0 kB/s)

any ideas?
regards

More packages support?

As stated in https://github.com/Gregwar/notroot/#support, this script is designed only to install libraries and binaries. But it would be nice if you could somehow install more things, like a complete desktop environment. Have you planned that this will ever be added, or did you just discontinued this project?

Like:

$ notroot install xfce4
[NOTROOT] Installing xfce4 from apt...
[NOTROOT] Scanning dependencies with apt-rdepends...
Can't locate AptPkg/Config.pm in @INC (you may need to install the AptPkg::Config module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/aarch64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base) at /home/user/notroot/usr/bin/apt-rdepends line 108.
BEGIN failed--compilation aborted at /home/user/notroot/usr/bin/apt-rdepends line 108.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 xfce4 all 4.14 [4980 B]
Fetched 4980 B in 0s (22.7 kB/s)

$ startxfce4
bash: startxfce4: command not found

Edit: I seem to get that error on all packages, but some of them do work after installating tho:

$ notroot install neofetch
[NOTROOT] Installing neofetch from apt...
[NOTROOT] Scanning dependencies with apt-rdepends...
Can't locate AptPkg/Config.pm in @INC (you may need to install the AptPkg::Config module) (@INC contains: /etc/perl /usr/local/lib/aarch64-linux-gnu/perl/5.30.0 /usr/local/share/perl/5.30.0 /usr/lib/aarch64-linux-gnu/perl5/5.30 /usr/share/perl5 /usr/lib/aarch64-linux-gnu/perl/5.30 /usr/share/perl/5.30 /usr/local/lib/site_perl /usr/lib/aarch64-linux-gnu/perl-base) at /home/user/notroot/usr/bin/apt-rdepends line 108.
BEGIN failed--compilation aborted at /home/user/notroot/usr/bin/apt-rdepends line 108.
Get:1 http://ports.ubuntu.com/ubuntu-ports focal/universe arm64 neofetch all 7.0.0-1 [77.5 kB]
Fetched 77.5 kB in 0s (173 kB/s) 

$ neofetch
# works and shows the output

apt update?

I just can't install the package because it thinks it's not there

$ notroot install neofetch
Installing neofetch from apt...
E: Unable to locate package neofetch

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.