2 Ways to Install RPM Without Dependencies in Linux

LINUX
FUNDAMENTALS
A Complete Guide for Beginners Enroll Course Now

An RPM (RedHat Package Manager) package is a software distribution format used primarily in RedHat-based Linux distributions such as CentOS, Fedora, and others. However, installing RPM or any other package in your system may prerequisite some other packages called dependencies. Though it is not a safe approach for regular users to install a package without dependencies, developers may need to install a specific .rpm file only without any dependencies to inspect its own functionalities. This tutorial will guide you to install an rpm package without any dependencies in RedHat and Debian-based system.

Key Takeaways

  • Installing RPM package in Ubuntu and RHEL.
  • Inspecting dependency issues regarding Photocollage installation.
  • Ignoring dependency during the installation.

Requirements

Process Flow Chart

[Distro Used Throughout the Tutorial: Ubuntu 22.04.1 LTS and RHEL 9.2]2 ways to install RPM without dependencies.

Free Downloads

Install RPM Without Dependencies in Various Distributions of Linux

Dependencies specify the relationship among packages and what packages need to be installed on the system for a particular package to work as intended. “.rpm” is a package extension used to install software on Linux distributions that follow the RedHat ecosystem. In this tutorial, I’ll show you different ways that you can use to install RPM packages without the dependencies in RedHat-based and Debian-based distributions.

A. Install RPM Without Dependencies in RHEL

Actually, rpm packages are built to run in RedHat-based Linux distributions such as CentOS, Fedora, and RHEL. These distributions have two widely used package managers called “yum” and “rpm”. YUM (Yellowdog Updater, Modified) is a high-level package management tool used primarily in Red Hat-based Linux distributions that automatically handles dependencies.

On the other hand, RPM is a low-level package management tool that directly handles package installation. So, you can use RPM to ignore dependencies while installing a .rpm package. In this tutorial, I’ll install VLC player .rpm file without dependencies to give you a practical example. Follow the steps below.

Steps to Follow >

➊ Download and extract the RPM file of VLC player from the Free Downloads section in this article. By default, it will be downloaded in the Downloads/ directory.

➋ Open the RHEL terminal.

➌ Run the below command to list the files in Downloads/ directory:

cd ~/Downloads/

ls
EXPLANATION
  • cd: Command to Change Directory.
  • ls: Lists all the files and folders in the mentioned directory.
  • ~/Downloads/: Absolute path of Downloads directory.
RPM file of VLC in Downloads directory of RedHat➍ Run the following command to install the .rpm file of VLC:

sudo rpm -i vlc-3.0.19-0.7.fc39.x86_64.rpm
EXPLANATION
  • sudo: Enables administrative permission.
  • rpm: Calls RPM package manager.
  • -i: Flag for installing a file.
  • vlc-3.0.19-0.7.fc39.x86_64.rpm: Full name of the rpm file.
Failed dependencies during VLC installation in RedHatThe output shows that an error occurred in the installation of the VLC package due to Failed Dependencies. But you can ignore the dependencies and install only a specific package without installing any dependency package by the next step:

➎ Type the below command:

sudo rpm -i –nodeps vlc-3.0.19-0.7.fc39.x86_64.rpm
EXPLANATION
  • –nodeps: Tells the package manager not to check dependencies.

➏ Press ENTER.Installing VLC without dependencies in RedHatThe above command will install the download rpm file of VLC player without installing any dependency.

Now, to check whether the installation was successful, you can follow the below steps:

➐ Run the following command:

sudo rpm -qa | grep vlc
EXPLANATION
  • sudo: Enables administrative permissions.
  • rpm: Command to use RPM package manager.
  • -qa: Stands for Query All. Used to query all installed packages.
  • | (Piping symbol): Use the output of the left side command as input of the right side command.
  • grep: Command to search a specific pattern or keyword.
  • vlc: Keyword to search.
Justification of the installation of VLC in RedHatThe above command finds vlc-3.0.19-0.7.fc39.x86_64.rpm in the list of installed files list. So, the package installation was successful.

B. Install RPM Without Dependencies in Ubuntu

Although rpm package type is for using in RedHat-based distribution, you can install an rpm package in Debian based system by converting the file type from rpm to deb and then installing it using a package manager.

Generally, APT (Advanced Package Tool)  and DPKG (Debian Package Manager) are two frequently used package managers in Debian-based system such as Ubuntu. APT is a high-level package manager that automatically installs dependencies while installing a package. On the other hand, DPKG handles dependencies manually and thus you can use it to bypass dependencies.  To illustrate, I’ll install the rpm file of TamViewer without dependencies in Ubuntu.

Steps to Follow >

➊ Download and extract the RPM file of TeamViewer from the Free Downloads section in this article. By default, it will be downloaded in the Downloads/ directory.

➋ Open the Ubuntu terminal.

➌ Run the below command to list the files in Downloads/ directory:

cd ~/Downloads/

ls
EXPLANATION
  • cd: Command to Change D.
  • ls: Lists all the files and folders in the mentioned directory.
  • ~/Downloads/: Absolute path of Downloads directory.
RPM file of TeamViewer in the Download directory of Ubuntu.The presence of rpm file of TeamViewer in the Downloads/ folder ensures successful downloading of the file.

➍ Now, convert the .rpm file to .deb package by running the following command:

sudo alien -d teamviewer_15.44.5.x86_64.rpm
EXPLANATION
  • sudo: Enables administrative permission.
  • alien: Calls Alien package management tool.
  • -d: Option to convert the provided file into a Debian
  • teamviewer_15.44.5.x86_64.rpm: Full name of the .rpm file.
Converting rpm of TeamViewer to deb by Alien.The above command will create a .deb package from the .rpm file in the same directory. To check it, execute the next step.

➎ Run the command to view files in the current directory:

ls

Both the rpm and converted deb file is in the download directory now.Now, besides the RPM file you can see another package of TeamViewer with .deb extension.

➏ At this stage, try installing the .deb file by the following command:

sudo dpkg -i teamviewer_15.44.5-1_amd64.deb
EXPLANATION
  • dpkg: Calls DPKG package manager.
  • -i: Option for installing a file with dpkg.
  • teamviewer_15.44.5-1_amd64.deb: Full name of the .deb file.
Note: The .deb file can be created with a different name in your system. Use the exact filename in the above command according to the .deb file created in your system.

➐ Enter user password.Dependency error while installing TeamViewer by dpkg.The output shows that an error occurred in installing teamviewer_15.44.5-1_amd64.deb because it depends on libminizip1 which is not installed. But you can ignore the installation of dependencies by mentioning their names.

➑ Run the following command:

sudo dpkg -i –ignore-depends=libminizip1 –force-depends teamviewer_15.44.5-1_amd64.deb
EXPLANATION
  • –ingore-depends=libminizip1: Ignores the dependency on libminizip1 during installation.
  • –force-depends: Forces the installation of the package even if dependency issues occur.
  • teamviewer_15.44.5-1_amd64.deb: Full name of the .deb file.
Installing TeamViewer without dependencies by dpkg.
Note: If you find error for more than one dependencies, write them all after –ignore-depends= separated by space. Use the exact filename in the above command according to the .deb file created in your system.
The above command will install teamviewer_15.44.5-1_amd64.deb in your Ubuntu. Moreover, if you want to verify the installation, follow the below steps:

➒ Run the following command:

apt list –installed | grep teamviewer
EXPLANATION
  • apt: Uses APT package manager.
  • list: Command to create a list.
  • –installed: Fetches the name of Installed packages.
  • | (Piping symbol): Use the output of the left side command as input of the right side command.
  • grep: Command to search a specific pattern or keyword.
  • teamviewer: Keyword to search.
Verifying the installation of TeamViewer in Ubuntu.The above command output verifies that TeamViewer package installation was successful.

Common Challenges That May Arise

Dependencies are other software components that the package you’re installing relies on to function properly. Here are some of the issues you might encounter when you install a package without its dependencies:

  • Software Incompatibility: The package you’re installing might require specific versions of libraries, tools, or other software components. Without those dependencies, the software might not work correctly or at all.
  • System Instability: When software components don’t work together as expected, it can lead to system crashes, freezes, or other instability issues.
  • Security Vulnerabilities: Dependencies often include security updates and patches. If you install software without its dependencies, you might miss critical security updates, leaving your system vulnerable to attacks.
  • Dependency Chain: Dependencies can have their own dependencies. Skipping one can break the entire chain and lead to cascading issues.
  • Difficulty in Upgrades: Upgrading the software or your system in the future might become more complex or impossible due to missing dependencies.
  • Software Removal: If you want to remove the software later, you may face difficulties in uninstalling it if you don’t install the depe properly.

Unless you are installing a package for testing purposes in the development scenario, it’s strongly recommended to always install packages with dependencies to ensure that your system remains stable and secure.

Conclusion

You must be cautious when installing packages without their dependencies, as it can lead to unexpected issues like unstable system. I recommend you to use package managers that handle dependency resolution to ensure system stability. Consider using isolated environments like virtual machines or containers to test or troubleshoot software in a specific scenario,

People Also Ask

How do I ignore dependencies in RPM spec?
You can tell rpm to ignore dependencies during system verification with the –nodeps. The command syntax is sudo rpm -i –nodeps <file.rpm>. If you want RPM to verify just dependencies and not file attributes, use the –nofiles flag instead of –nodeps.
How to install RPM directly?
Firstly, download the .rpm file you want to install. Then navigate to the directory of the downloaded file and open the terminal. Run the following command: sudo rpm -i <file.rpm>. Use the downloaded file’s full name with .rpm extension in the place of <file.rpm>.
How to forcefully install RPM package?
The –replacepkgs option is used to force RPM to install a package that is installed already. The syntax is sudo rpm -i –replacepkgs <file.rpm>. It will replace the existing package with the later one. If you want to forcefully install an RPM package without dependencies, use this command: sudo rpm -i –nodeps <file.rpm>.
Does RPM contain dependencies?
Yes, dependencies are packages that an RPM requires to function properly. RPM contains dependencies like almost every other package in Linux. This is because Linux software is built like a collection of modules to ensure reusability.

Related Articles


<< Go Back to Dependencies in Linux | Package Management in Linux | Learn Linux Basics

Rate this post
Ashikur Rahman

Hello, I’m Ashikur Rahman, currently working as a Linux Content Developer Executive at SOFTEKO. I have completed my graduation in Computer Science and Engineering from Khulna University of Engineering & Technology (KUET). Also, I’m pursuing my master’s in the same department at Bangladesh University of Engineering & Technology (BUET). I like to learn new technologies, contribute, and share those with others. Here my goal is to provide beneficial and user-friendly articles on Linux distribution for everyone. Read Full Bio

Leave a Comment