Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Saturday, July 30, 2011

Required packages for building an Android OS on Ubuntu

Problem
You're trying to install the required packages for building a complete Android Operating System from scratch. Upon pasting the commands from the official documentation, you get the following error:

E: Couldn't find package lib32ncurses5-dev
E: Couldn't find package lib32readline5-dev
E: Couldn't find package lib32z-dev
E: Couldn't find package mingw32


Solution
The list of required packages for building an Android OS is wrong. The correct packages are:

sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev libc6-dev lib64ncurses5-dev \
x11proto-core-dev libx11-dev lib64readline5-dev lib64z-dev \
libgl1-mesa-dev g++-multilib tofrodos


Note: This has been tested on Ubuntu 10.04 (Lucid Lynx). YMMV.

Wednesday, March 16, 2011

Downgrading from PHP 5.3 to 5.2 on Debian Squeeze

Problem

You've installed PHP 5.3 on your Debian Squeeze system. Problem is, some web apps have trouble running on that version. You need to downgrade your system from 5.3 to 5.2.

Solution

Remove the PHP 5.3 packages from your system:
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
Clean the cache just to be sure:
rm -f /var/cache/apt/archives/php5*
Use Karmiс for PHP packages:

echo -e "Package: php5\nPin: release v=karmic\nPin-Priority: 991\n" | sudo tee /etc/apt/preferences.d/php > /dev/null
apt-cache search php5-|grep php5-|awk '{print "Package:", $1,"\nPin: release v=karmic\nPin-Priority: 991\n"}'|sudo tee /etc/apt/preferences.d/php > /dev/null
Add Ubuntu Karmic to source list:

cd /etc/apt/sources.list.d
sudo wget -O karmic.list "http://pastebin.com/download.php?i=q9ya307g"
(Update, October 18, 2012: The sources list has been updated, because Ubuntu no longer supports Karmic. Please leave a comment if this still doesn't work.)

Update the package database:
sudo apt-get update
If the command above produces this error:

W: GPG error: http://security.ubuntu.com karmic-security Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://archive.ubuntu.com karmic Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
W: GPG error: http://archive.ubuntu.com karmic-updates Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5
Then import the required keys and add them to your list of trusted keys:

gpg --keyserver hkp://subkeys.pgp.net --recv-keys 40976EAF437D05B5
gpg --export --armor 437D05B5 | sudo apt-key add -

gpg --keyserver hkp://subkeys.pgp.net --recv-keys 40976EAF437D05B5
gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -

gpg --keyserver hkp://subkeys.pgp.net --recv-keys 40976EAF437D05B5
gpg --export --armor 40976EAF437D05B5 | sudo apt-key add -
Finally, install PHP 5.2:
sudo apt-get install -t karmic php5-cli php5-cgi libapache2-mod-php5
UPDATE: Using the Ubuntu sources to download old packages works on Debian. So far, it works on my system, but you may need to use the Debian sources just in case.

Thursday, August 05, 2010

I hate Linux part 2

OK, I was able to run SystemRescueCd's USB creator by running it in Ubuntu Lucid. The USB stick booted, but when I ran GParted, it wasn't able to detect the RAID array.

Linux = FAIL.

The point of this exercise was to run GParted in order to resize our FreeBSD's /usr partition to make way for ZFS. I allocated around ~400GB of space to that partition, but I realized that it's better to use that space for ZFS since I'll be using it for jails.

FreeBSD jails + ZFS = WIN.

I'll just copy /usr to /var, resize it, and move back /usr to the new partition. I hope this works.


(this is probably GParted's fault, but I love to troll hahaha)

Tuesday, August 03, 2010

I hate Linux


Yet another reason why I hate Linux:

SystemRescueCd, a Linux distro designed for administering or repairing a system, doesn't boot and stops with the following error:

!! Cannot find device with /sysrcd.dat. Retrying...

After a bit of googling, it turns out that this occurs because Linux can't detect the USB CD-ROM that was used to boot it. This use case isn't QA'd anymore. Apparently, the solution is to use a USB stick instead.

But what happens if you use a USB stick? It doesn't work:

[root@soulfury mnt]# mount -o loop,exec ~simoncpu/Desktop/systemrescuecd-x86-1.5.8.iso cdrom
[root@soulfury mnt]# cd cdrom
[root@soulfury cdrom]# ls
bootdisk bootprog isolinux ntpasswd sysrcd.dat sysrcd.md5 usb_inst usb_inst.sh usbstick.htm version
[root@soulfury cdrom]# bash usb_inst.sh
No valid USB/Removable device has been detected on your system

I checked the usb_inst.sh source code, and it makes some invalid assumptions on what a USB stick is. Blah. I need to sleep.

Friday, February 19, 2010

Moblin, Eeebuntu 4.0 beta, etc

Just got back from Cebu GNU Linux Users Group meeting. I saw someone using Moblin. Three thumbs up! The UI is very intuitive, and will have no problems with mainstream customer adoption.

Meanwhile, Eeebuntu 4.0 is not even ready for early adopters. The installation stopped somewhere at around 95% and complained about failed GRUB setup. I'm currently downloading Ubuntu 9.10 Netbook Remix because my Eee is left with a broken OS. Let's see how this goes.

Wednesday, January 27, 2010

Moblin

I'm attempting to compile Moblin OS so that I can try it on my Eee. Moblin supposedly incorporates techniques for making Linux boot in 5 seconds, techniques which were presented on a Linux conference some time ago. According to its official site, Moblin doesn't support non-SSE3 CPUs. My Eee uses a Celeron M ULV 353 CPU, so yeah it's a non-SSE3 CPU. But what the heck, I'll go ahead and try it anyway. It's not like it's going to explode anyway. There must be some patches out there that would it enable it to work.

If it works, I'll try to use Boot Booster so that I can further shorten the time it takes to turn my PC on and load GRUB.

BTW, I'm also interested to know if coreboot works with Eee. Since I would need to mess with its ROM, there would be a real danger of bricking it, and turning it into a very expensive paper weight. Blah...

Tuesday, January 26, 2010

vimperator for Chrome

I need to have total keyboard for Chrome. I'll experiment with vimperator-like clones for Chrome...

OC

Behold, for Eee customization is such a dangerous territory. It has activated my latent OC tendencies, and now I can't sleep. Hurrrr...

Eee FSB

I'm not sure if I should overclock my Eee by default. So far, the performance is good (that is, when I switched to Chrome). I think I'll just let it be, unless I really need it since I run the risk of frying my CPU. I've already fried a CPU once... Anyway, I've found a Quicksilver clone for Linux-- it's called gnome-do. Very cool...

Eeebuntu

I've always wanted to customize my Eee PC, but I'm too lazy to do it. Anyway, I've come up with a list of usability problems that I need to fix so that I can use my Eee more effectively.
  • Unresponsive browser. At first, I tried using Opera, but I realized that its UI is very ugly, and its speed wasn't as fast as I hoped to be. I was able to solve this by replacing Firefox with Chrome. Chrome's speed can really be felt on an Eee.
  • Small screen. I've solved this by using fluxbox instead of Eeebuntu's default desktop environment, which is GNOME. I've eliminated most elements that waste screen estate, such as the window decoration, taskbar, and other stuff. I wanted to add a cool dock-like app, but I realized that it would waste screen estate and would require a mouse anyway.
  • Crappy touchpad. The solution to this problem is dependent on other solutions (i.e., using a keyboard friendly WM and app launcher). I wanted to do a touchscreen hack, but I can't find the necessary parts here in Cebu. Of course, I can always use a mouse, but it defeats the purpose of using a portable netbook. I don't want to bring a mouse wherever I go.
  • Non-straightforward way of launching apps. I'm not really a fan of Netbook Remix's UME launcher, but I realized that I need something similar to it. Perhaps I need to use something like Quicksilver (a very useful Mac OS X app that lets you run apps anywhere by simply typing its name).

Tuesday, November 03, 2009

Linux 2.6.31 kernel


Linux 2.6.31 kernel is pants. I'm back to 2.6.28, and will wait for at least a month for the issues to settle down.

Tuesday, June 02, 2009

HOWTO Access a VMWare console from Mac OS X or Linux

Problem

There are no VMWare Server clients for Linux and Mac OS X. VMWare provides a Web UI for its server, but it requires a plug-in that doesn't work* on non-Windows platforms.

Solution
  1. SSH into the VMWare Server.
  2. Navigate to the VM folder, and edit the *.vmx file.
  3. Enable VNC by appending the following settings:
    remotedisplay.vnc.enabled = "TRUE"
    remotedisplay.vnc.port = "5900"
    remotedisplay.vnc.password = "foobar"
  4. Start/restart your VM.
  5. Connect to your VM using a VNC client. I'm currently using Chicken of the VNC. You might want to google for a client that suits you.
If you need to connect to multiple VMs, simply use a different port (5900 for display :0, 5901 for diplay :1, etc).

I haven't tried this with VMWare ESX Server. I'll try this in the office tomorrow.

* It somewhat works in Linux.

Monday, November 24, 2008

Hello world from links

I forgot to bring my MacBook, so I'm now surfing the Net in a text-only browser inside a server. I'm surprised that Blogger works. Very cool.

Friday, November 14, 2008

HOWTO Turn off DHCP Servers in VMware Linux

To turn off VMware's DHCP server in host-only network, simply find the appropriate DHCP process, and kill it:

root@soulfury:~# ps auxww | grep dhcp
root 5060 0.0 0.0 1892 252 ? Ss Nov10 0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet8/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet8/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet8.pid vmnet8
root 5061 0.0 0.0 1888 520 ? Ss Nov10 0:00 /usr/bin/vmnet-dhcpd -cf /etc/vmware/vmnet1/dhcpd/dhcpd.conf -lf /etc/vmware/vmnet1/dhcpd/dhcpd.leases -pf /var/run/vmnet-dhcpd-vmnet1.pid vmnet1
root 21281 0.0 0.0 2796 748 pts/0 R+ 15:31 0:00 grep dhcp
root@soulfury:~# kill 5061

Thursday, May 29, 2008

Fedora/Redhat Linux: C/C++ : unfound library "mysql.h"

If you encounter this problem while compiling an application that links to MySQL, you can fix this by simply installing mysql-dev:
    # /etc/init.d/mysqld stop
    # yum install mysql-dev

Tuesday, February 19, 2008

Live DVD for Linux Games

I'm currently researching for information on how to build BSD systems that are small enough to fit inside a CF card with enough space left for user data. This is for an embedded application project that would magically transform packets through some magical incantation.

As I was googling, however, I came across a Linux project for Linux games. The project is live.linuX-gamers.net, "a collection of games [that would run directly] from DVD without the user in need to know about Linux or care about his system." Its motto is "boot 'n play."

Very cool. I might try it some time.

Saturday, October 13, 2007

KDE in Ubuntu

I've just installed KDE on my Ubuntu box. It's been a long time since I've last used KDE. I want to try it to see how things have improved over the years.

Installation via Synaptic was very simple. KDE is now running on my left box, and the UI looks impressive at first glance. One problem though: the menu is a mess. The programs are packed into big sub-menus, and it's very annoying to sift through the labels just to find what I need. The problem is aggravated by the fact that Gnome apps are mixed with KDE apps in the menu. Where the bleep is the KDE Control Center? How the frack will I change the screen resolution without directly modifying xorg.conf? I don't need all of these programs in the menu. I just need to change the screen resolution and customize my box via Control Center. Aaaaaaaargh... KDE has become bloated.

Thursday, October 04, 2007

xmms-wma on Ubuntu

To play Windows Media Audio (WMA) files on XMMS, just do the following steps:
  1. Open Synaptic Package Manager.
  2. Install xmms-dev.
  3. Download xmms-wmma plugin from <http://mcmcc.bat.ru/xmms-wma/>.
  4. Extract the package.
  5. In the current directory of your extracted files, do make install.
Rock on!

Friday, September 28, 2007

xmms-shn on Ubuntu

To play Shorten (SHN) files on XMMS, just do the following steps:
  1. Open Synaptic Package Manager.
  2. Install xmms-dev.
  3. Download xmms-shn plugin from <http://www.etree.org/shnutils/xmms-shn/>.
  4. Extract the package.
  5. In the current directory of your extracted files, do ./configure, make, and make install.
Yeah, yeah. My instructions are not very precise. It should give you sufficient idea though. Just post a comment if any of the steps are unclear.

Rock on!