How do I install a package in Linux?

Khánh Đoan

New member
How do I install a package in Linux?
Answer
To install a new package, complete the following steps:
  • Run the dpkg command to ensure that the package is not already installed on the system: ?
  • If the package is installed already, ensure it is the version you need.
  • Run apt-get update then install the package and upgrade:
Photo in the article by “Wikimedia Commons”
Code:
https://commons.wikimedia.org/wiki/File:QR_Launchpad_mkd-packages_src%2B_Linux-bin.png
Follow these steps:
  • Open up a terminal window.
  • Issue the command sudo apt-get upgrade.
  • Enter your user’s password.
  • Look over the list of available updates (see Figure 2) and decide if you want to go through with the entire upgrade.
  • To accept all updates click the ‘y’ key (no quotes) and hit Enter.
Because information about what updated versions of packages are available is obtained by running sudo apt-get update (or sudo aptitude update ), it is advisable to run this before installing any package, and necessary to run it to install the latest updates, even if you have not added or removed any Software Sources (
Follow these steps:
  • Open up a terminal window.
  • Issue the command sudo apt-get upgrade.
  • Enter your user’s password.
  • Look over the list of available updates (see Figure 2) and decide if you want to go through with the entire upgrade.
  • To accept all updates click the ‘y’ key (no quotes) and hit Enter.
3 Answers
  • Check your current version with cmake –version.
  • Uninstall it with sudo apt remove cmake.
  • chmod +x /path/to/cmake-3.6.2-Linux-x86_64.sh (use your own file location here, but chmod makes the script executable)
  • sudo /path/to/cmake-3.6.2-Linux-x86_64.sh (you’ll need to press y twice)
How do I use the latest GCC on Ubuntu?
  • If you want to install gcc-4.8 , you need to use sudo apt-get install gcc-4.8 .
  • @Dumindu But how do I use gcc-4.9 specifically? –
  • Uninstall others and install 4.9. –
  • @Dumindu Wait, did you just tell me to do what I just did?
  • switch to root user : sudo su – goto /usr/bin then run ls -l gcc* and post your output.
12.04 LTS (Precise), you will need to take package updates. You can do this by running sudo apt-get update && sudo apt-get install –only-upgrade openssl , and then restarting your Stripe application. You may also need to update your libssl .
with self-update
  • Mac. Go to nodejs.org, click ‘install’, and run through the install process.
  • Ubuntu. Run the following on your command line to install the source for nodejs curl -sL https://deb.nodesource.com/setup | sudo -E bash –
  • Windows. Go ahead the download the Windows binary and make sure to restart your computer.
I would generally recommend using sudo apt-get update ; sudo apt-get dist-upgrade , as this will update everything that apt-get can update on your system. If you don’t already have VIM installed, you can get it using sudo apt-get install vim .
To add a repository to your system’s software sources:
  • Navigate to Ubuntu Software Centre > Edit > Software Sources > Other Software.
  • Click Add.
  • Enter the repository’s location.
  • Click Add Source.
  • Enter your password.
  • Click Authenticate.
  • Click Close.
After you have run the general updates on the server you can get started with installing Git.
  • Install Git. apt-get install git-core You may be asked to confirm the download and installation; simply enter y to confirm.
  • Confirm Git the installation.
  • Configure Git’s settings (for the root user)
  • Verify the Config changes.
 

Tìm kiếm

Back
Top