Powered By

Powered by Blogger

Tampilkan postingan dengan label apt-get. Tampilkan semua postingan
Tampilkan postingan dengan label apt-get. Tampilkan semua postingan

Minggu, 24 Oktober 2010

Undo apt-get build-dep (Remove Build Dependencies)

When you want to compile something from source in Ubuntu/Debian, the easiest way to install the dependencies required to compile it is to run (sudo) "apt-get build-dep PACKAGE_NAME". But there is no built-in command to remove these dependencies (like apt-get remove-dep).

But thanks to tvst and Wesley Schwengle, you can undo "apt-get build-dep" by running the following command:
sudo aptitude markauto $(apt-cache showsrc PACKAGE_NAME | grep Build-Depends | perl -p -e 's/(?:[\[(].+?[\])]|Build-Depends:|,|\|)//g')
In the above command, replace "PACKAGE_NAME" with the name of the package you've previously ran "apt-get build-dep" for.

Note for Ubuntu 10.10 users: to use the above command, you need to install aptitude (if you haven't already) because it's not installed by default anymore:
sudo apt-get install aptitude


remove apt-get build-dep


In case you're wondering what the above command does:
  • aptitude markauto - Mark packages as having been automatically installed (so if no package depends on them, they will be removed)
  • apt-cache showsrc - Show source records
  • grep Build-Depends: - searches for "Build-Depends:" in the source records
  • perl -p -e 's/(?:[\[(].+?[\])]|Build-Depends:|,|\|)//g' - removes useless stuff from the package names (like "Build-Depends:", the parentheses and what's in between) so we can use the exact package names in the "aptitude markauto" command.


To use it as an alias in your ~/.bashrc file, see wilo108's comment below.



Credits for the command: tvst and Wesley Schwengle @ Launchpad.

Minggu, 17 Oktober 2010

Apt-Proz And Apt-Metalink: 2 Alternatives To Apt-Fast [Speed Up Apt-Get Download Speed]

apt-fast is a shell script to accelerate apt-get downloads using Axel, a command line download accelerator. Based on apt-fast, some other scripts have been created and I though they are worth mentioning:

apt-proz - which is maintained in a PPA by Damar Riyadi (thanks for the tip!), who also maintains apt-fast in his repository -, uses ProZilla to handle the downloads and Damar says it's faster (at least for him) then apt-fast (using Axel). You can get apt-proz from this PPA: ppa:tldm217/tahutek.net, then to use it, simply replace "apt-get" with "apt-proz" when installing / upgrading a package.

apt-metalink allows you to download deb packages from several sources concurrently by using repository mirrors (you'll have to add them manually in the sources.list file). It uses Aria2 to download the files and it has an extra feature compared to apt-fast and apt-proz: it can check the hash of the downloaded files. For more info and usage, see apt-metalink @ Github.

Rabu, 18 Agustus 2010

You Can Now Install Apt-Fast From A PPA Repository

apt-fast

Remember apt-fast? Allow me to remind you: apt-fast is a simple bash script that speeds up apt-get download speed (so you would run "sudo apt-fast install firefox" to install Firefox for example) by using Axel, a command line application which accelerates HTTP/FTP downloads by using multiple sources for one file. The author claims it's roughly 26x faster than the normal apt-get and I don't know if that's true, but a lot of users are reporting visible download speed improvements

A while back, Apt-Fast got full Apt-Get syntax replacement and now you can finally install Apt-Fast from a PPA so it's easier to install, even by non-technical users.

To install apt-fast in Ubuntu, simply copy/paste the following commands in a terminal:
sudo add-apt-repository ppa:tldm217/tahutek.net
sudo apt-get update
sudo apt-get install apt-fast

The above PPA is available for Ubuntu 9.10 Karmic Koala, 10.04 Lucid Lynx and 10.10 Maverick Meerkat!

From now on, you can use "apt-fast" instead of "apt-get" for installing packages via the command line. apt-fast doesn't just support "install" but also "upgrade" and so on.

Selasa, 15 Juni 2010

Win-Get Is An Apt-Get Like Package Manager For Windows And WINE

Note: this application works on Windows too (obviously), however I'm only going to talk about installing and using it in Linux, using WINE.


Win-Get is a automatic software installer and package manager for Windows inspired by apt-get. Using win-get, you can install packages in WINE just like with apt-get:

win-get install firefox vlc


It also supports other apt-get like commands such as:
win-get search APPLICATION
win-get update
And so on.


If the installer of your application supports it, win-get can even install your application automatically, so you don't have to click through the setup wizard.

You can see a complete list of applications which you can install using Win-Get (the Win-Get repository), HERE.

How To Install Win-Get in Linux



To download and install Win-Get, simply run the following commands in a terminal:

cd ~/.wine/drive_c/windows
wget http://downloads.sourceforge.net/project/win-get/win-get/0.1.2/win-get-0.1.2.zip?use_mirror=kent
unzip win-get-0.1.2.zip
cd win-get-0.1.2/
chmod +x win-get.exe


Now, to be able to use Win-Get as easy as... win-get, you must create a file in your bin folder and paste a simple line of code. Create the file using the following command:
sudo gedit /usr/local/bin/win-get &


And paste this inside the newly created file:

#!/bin/bash
wine ~/.wine/drive_c/windows/win-get-0.1.2/win-get.exe $@


Then make the newly created file executable:
sudo chmod +x /usr/local/bin/win-get



That's it!


When running Win-Get for the first time, update the repository:
win-get update


Then you can try to install some applications.



If you want to manually download Win-Get, see HERE.



Many thanks to U8UNTU eLXER!

Kamis, 10 Juni 2010

Aptitude Removed From Ubuntu 10.10 Maverick Meerkat

While many believed "aptitude" will soon replace "apt-get" given the fact that it's a lot "smarter", it seems that's not the case in Ubuntu - in fact it's quite the opposite: aptitude has been removed from Ubuntu 10.10 Maverick Meerkat though it is still available in the repositories.

This comes as a surprise, especially since Debian officially endorses aptitude over apt-get.

There was an attempt to remove aptitude a few releases back, but it was saved by the fact that it didn't take too much space on the CD. But for some unknown reason, the meerkats didn't like aptitude so it was removed from Ubuntu 10.10 as you can see HERE.

Update: apparently the reason for this is to free up some 13-14 mb of space from the CD.


Once again thanks to Manish for the heads up!

Rabu, 02 Juni 2010

Apt-linker Chrome Extension Turns "apt-get install" Into "apt://" Links [Ubuntu]

Apt-linker is a Chrome extensions which turns "apt-get install" text from websites into apt:// links, meaning you'll be able to click any "apt-get install" line to install applications instead of having to copy/paste the lines into a terminal.

The extension has a side effect for bloggers: if you try to edit a post which has some "apt-get install" text, it will show up as blank. Other than that, the extension works great and if you follow tutorials from forums / blogs constantly, you'll find it a real time-saver.

Apt-linker works in Google Chrome / Chromium on any Debian based Linux distribution (Ubuntu and so on).

Sabtu, 16 Januari 2010

New Apt-Fast Version, Now With Full Apt-Get Syntax Replacement [Ubuntu / Debian]

After our post on "apt-fast", called Improve 'apt-get install' And 'upgrade' Speed, the script created by Matt Parnell (so all the credits go to him) has got a lot of attention and a new version tweaked by travisn000.

But maybe you don't know what "apt-fast" is. Well, it's a script which uses Axel, a command line application which accelerates HTTP/FTP downloads by using multiple sources for one file, and one can use it instead of "apt-get" on Debian based Linux distributions to get an amazing download speed improvement. Check out the post on the pclinuxos to see how everybody is reporting ~double apt-get speeds with apt-fast. Yes, it's not an actual Internet connection speed improvement, just some tweaks which make packages download faster with Axel.

The new version of the script includes full apt-get syntax replacement, and it might even be a few milliseconds faster as it has a few less calls to grep. It also won't call xargs / axel when nothing needs to be downloaded like the original script did (causing axel errors to print).

To use the latest version of Apt-Fast, firstly install Axel:
sudo apt-get install axel

Then, get the latest version of the apt-fast script from HERE. The latest version was released in mid-December but I wasn't aware of it until now.

After downloading the script, remove the ".sh" extension and place the script in /usr/bin so you can then simply replace "apt-get" with "apt-fast" to install a package, for a system upgrade and so on (don't forget to also make it executable with: chmod +x /usr/bin/apt-fast).


For more info, visit Matt Parnell's post and our original post.

Kamis, 03 Desember 2009

How To Upgrade When You Don't Have Enough Space Left On The Root Partition [Ubuntu]

Suppose you want to do an upgrade of a few GB (upgrading from Jaunty to Karmic for instance) and you only have a 50-100 MB left on your root partition. If you have created both a home (/home) and root (/) partition when you installed Ubuntu, there is a way to make this upgrade: using apt cache redirect:

1. Open a terminal and run the following command in order to delete the cached packages:
sudo apt-get clean

2. In your /home folder, create a new directory owned by root (you can set this by right clicking on a folder, then selecting "Propreties", on the "Permissions" tab), called "apt" and another directory in the "apt" directory, called "cache". To save some time, you can simply run this command to create both folders:
mkdir -p /home/apt/cache

3. Create a new file at /etc/apt/apt.conf.d/02homecache. Open a terminal and type:
sudo gedit /etc/apt/apt.conf.d/02homecache

and paste this inside the file:
Dir::Cache::Archives "/home/apt/cache";

4. Run this in a terminal, to make sure you don't have any syntax errors:
sudo apt-get update


5. If you followed the steps correctly, now you can begin your upgrade.

Rabu, 25 November 2009

Improve 'apt-get install' And 'upgrade' Speed [How-to]

apt-fast

Axel is a command line application which accelerates HTTP/FTP downloads by using multiple sources for one file. For example, some FTP sites limit the speed of each connection, therefore opening more than one connection at a time multiplies the allowable bandwidth.

What if we could use a bash script to use "apt-get" with Axel so the "apt-get" download speed would increase dramatically? Well, you can, thanks to Matt Parnell who has created a bash script which does just that. The script works with any Linux distribution which uses "apt-get" (Debian, Ubuntu, etc.).

Before using the script, you must install Axel:
sudo apt-get install axel

Then create an empty file called apt-fast and paste this:

#!/bin/sh
#apt-fast by Matt Parnell http://www.mattparnell.com , this thing is FOSS
#please feel free to suggest improvements to admin@mattparnell.com
# Use this just like apt-get for faster package downloading. Make sure to have axel installed

#If the first user entered variable string contains apt-get, and the second string entered is either install or dist-upgrade
if echo "$1" | grep -q "[upgrade]" || echo "$2" | grep -q "[install]" || echo "$2" | grep -q "[dist-upgrade]"; then
echo "Working...";

#Go into the directory apt-get normally puts downloaded packages
cd /var/cache/apt/archives/;

#Have apt-get print the information, including the URI's to the packages
apt-get -y --print-uris $1 $2 $3 $4 > debs.list;

#Strip out the URI's, and download the packages with Axel for speediness
egrep -o -e "(ht|f)tp://[^\']+" debs.list | xargs -l1 axel -a;

#Perform the user's reqested action via apt-get
apt-get -y $1 $2 $3 $4;

echo "Done! Make sure and check to see that the packages all were installed properly. If a package is erred, run sudo apt-get autoclean and try installing it again without the use of this script.";

elif echo "$1" | grep -q "[*]"; then
apt-get $1;
else
echo "Sorry, but you appear to be entering invalid options. You must use apt-get and one of apt-get's options in order to use this script.";
fi

Then use the terminal to navigate to where you created the script and run this command:
chmod +x apt-fast


For easier usage, you can move it to the /usr/bin folder.

Now, instead of using: sudo apt-get install PACKAGE_NAME, use sudo apt-fast install PACKAGE_NAME or upgrade or dist-upgrade - it also works with those operations.

I must say I have obviously tested the script and indeed, it works really fast. I don't know if it's 26x faster as the author claims, but the speed improvement, well, let's just say you won't need to measure it to notice the difference!


Update: a new apt-fast version is out, now with full apt-get syntax replacement

Special thanks to Mahdi for suggesting this script!

Message from Testking: We provide high quality SY0-201 material and 70-680 practice exam so you will pass 642-902 on first attempt for sure.