How can I reinstall apt? [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
Hi!
I deleted by mistake, the command apt and apt-get...
My OS: Ubuntu 16.04 TLS
Error:
-bash: /usr/bin/apt: No such file or directory
-bash: /usr/bin/apt-get: No such file or directory
How can I reinstall APT command?

check out the packages.ubuntu.com page and look for the apt package, there you can download the binary .deb file depending on your processor architecture...
But consider that, the deb files have some dependencies... you have to install them too, for listing the package dependencies, use the dpkg, eg:
dpkg -I apt-armhf-blahblah.deb
if you deleted the apt package by itself, take a look at its log file in /var/log/apt/history.log, you can discover the name of packages that you removed.
HINT 1: since the DPKG can't automatically install the dependencies, you have to install them one by one!
HINT 2: that's recommended to remove your current OS and install the latest version because this version will not receive any maintenance update anymore.

Related

How to install software on a prorietary linux distro with no repos given? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 12 months ago.
Improve this question
I want to install some basic packages on a proprietary Linux distro based on RHEL (I think).
I tried going the usual dnf install foo way, but quickly found out there are no repositories in /etc/yum.repos.d/.
Since it is based on RHEL, I tried adding some RHEL repos, but still cannot install anything from them. I also tried downloading a package and install it from a local repo as explained here. But no packages are detected in the repo. My guess is that the proprietary distro is (too?) different from RHEL so those repos are not recognized.
So my question is: How do I install packages on a proprietary Linux distro? Is it only possible to install from repos that are meant precisely for the distro I am using? Or could it be that repos for another distro might work? The only other way I can think of is to try to find all the Git repos of all the packages I want to install to install them from source.
There are few possible ways:
activate your RHEL machine.. This include create account in RH. And
its free for small number of machines. More info here.
Download the package and do a local install:
dnf localinstall package.rpm
You should download and install all dependent packages also.
To update you can use nondocumented option:
dnf localupdate package.rpm

How to install dpkg file on debian linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I am new to Linux and I want to install .Deb software package in Linux. Let say I want to install chromex64.deb, how to install it? can anyone explain it?
You could try running dpkg -i chromex64.deb
If an error occurs saying that some dependencies are missing, install them using apt-get install
You can install by using dpkg -i command.
Navigate to download directory and open the terminal.
Run the following code:
sudo dpkg -i *.deb
If there is more deb file, specify the file name in place of *
If you find missing dependencies, you can try
sudo apt-get update --fix-missing

Find installation path in linux [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
When doing
apt-get install <service-name>
or
yum install <service-name>
services are automatically installed. How to find exact path where any service is installed and their configuration files??
There are quite a few ways to find this but I usually prefer following
whereis <service-name>
e.g whereis java
and to find from which path program is using, I use
which <service-name>
e.g which java
If you're using apt-get, install apt-file program and you can list the contents of the package:
sudo apt-file update
apt-file list package_name
This will show all the files that will be installed by a package, binaries, configuration files, systemd startup files, etc.
If you use yum, install yum-utils and use repoquery:
repoquery -l package_name
Suppose service name is nginx then you can find it in /etc/nginx/ on ubuntu.

bash: Automatically install package if not installed [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Let's say I thought I had SVN installed. I run the command and I get the following output:
aoneill#aoneill-Laptop:~/Documents$ svn
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion
My question is: Can I change the output, or catch such a situation, to say something like the following, with a prompt at the end?
aoneill#aoneill-Laptop:~/Documents$ svn
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion
Install the package? [y/n]
Thank you! It would make package handling that much nicer!
Exactly what you are looking for:
export COMMAND_NOT_FOUND_INSTALL_PROMPT=1

RedHat yum subversion installation [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am trying to install subversion on RedHat linux. But there is a bit problem with broken yum package manager. I have configured some own repositories from CentOS, but unfortunately there is still one broken dependency:
libneon.so.27
I have tried to download it on my own, but its dependencies are quite complex, it will cost me a lot of time to downlaod them all. Do you have any hints?
(Links to some repos with that libneon (rpmforge i have tried with no success))
You can download rpm forge repository from the links 32 bit or 64 bit depending upon your machine configuration. rpm forge package has most of the useful packages and dependencies. After that try the following command:
yum install mod_dav_svn subversion
or just try
yum install subversion
In addition to subversion You can also use GIT which is similar to svn but has its own additional benefits.
If you like you can install git using the command:-
yum install git

Resources