Posts Tagged ‘Linux’

Problems Updating Ubuntu 9.10 (postfix could not be installed)

Friday, February 19th, 2010

Recently (early February) a bunch of new updates to Ubuntu 9.10 appeared in the Ubuntu Update Center and without giving them much attention I simply pressed “Install”. So far nothing unusual. But this time I ended up with a request for “postfix” to be configured, which I ignored, I do not need postfix on my system, and two broken packages: bsd-mailx and lsb-core.

Here are my error messages:

E: /var/cache/apt/archives/postfix_2.6.5-3_i386.deb: subprocess new pre-installation script returned error exit status 1

and from the update manager

An error occurred, please run Package Manager from the right-click menu or apt-get in a terminal to see what is wrong. The error message was:
'Error: BrokenCount > 0' This usually means that your installed packages have unmet dependencies

I searched and removed bsd-mailx and lsb-core with Synaptic package manager, and by checking the packages dependencies found out that Google Chrome beta was responsible for the installation in the first place.

In fact there were a whole bunch of packages newly installed when I checked:
/var/log/apt/term.log
(lines starting with: Selecting previously deselected package…)

All of these packages where listed as “new install” in the update manager under a section misleadingly called “Distribution Upgrade”.

This is no severe issue (except maybe by mistakenly opening up your system by an imprudent postfix configuration) but rather an annoyance. Personally I resolved the issue by deinstalling the superfluous packages mentioned above and by deinstalling Google Chrome and removing the Google repository from my list of repositories. It is an unfortunate choice, since despite some issues with the Flash plugin, Chrome is a really nice and fast browser. I will try it again with an upcoming release when the package issue has hopefully been resolved.

Of course if you cannot live without Chrome you might resolve this issue differently.

Not available in the current data – Ubuntu Software Center

Sunday, November 1st, 2009

I just installed the Karmic Koala (Ubuntu 9.10) on all three of my machines and at first sight everything seems to be working great. I am especially pleased with the new look of the Ubuntu Desktop and of the Ubuntu Netbook Remix releases.

One thing thing that has been an issue, is that on using the new Ubuntu Software Center, I get the following error messages:

Not available in the current data
and
Not available for your hardware architecture

So in case anyone else is running into this try running:
sudo apt-get update
in a terminal.

From the man page:
“update is used to resynchronize the package index files from their sources.”

After that everything worked fine.

Installing Apache and php on Vista

Tuesday, March 3rd, 2009

Yet another article explaining how to install php and Apache on Vista?

You bet!

After spending way too much time getting this done for myself and finding many incomplete solutions in the top Google picks I hope to help others with something that should not even need an explanation.

I hardly ever boot Vista but for work I was forced to setup up an Apache, php, MySQL development environment on my Vista partition. Please note: Do not follow these instructions if you are setting up a productive environment.

The first (wrong) assumption was that I download the programs and install one after the other and everything just works. First of I was not certain what to enter into the installations masks. After installing Apache I got an error along the line of:

make_sock could not bind to address 0.0.0.0:80

or

Could not reliably determine the server’s fully qualified domain name

All of the files of the php and Apache installation were not writeable. After finally getting Apache to run, I just could not figure out how to install php with many different installation instructions adding to the confusion.

While I am not sure if all of these steps are necessary, this is how it worked for me, your mileage may of course vary:

  1. Download apache (my version 2.2.11) msi file
  2. Turn off UAC (user account control) I know nothing about Vista UAC and the  implications of turning it off. Please do this at your own risk.
  3. To turn off UAC: Start-> Control Panel -> User Accounts -> User Accounts -> Turn User Account Control on or off
  4. Uncheck “Use User Account Control (UAC) to help protect your computer” -> OK
  5. Reboot
  6. Start -> All Programs -> Accessories -> Command Prompt -> Right Click -> Run as Administrator
  7. Run: ”msiexec /i C:\Users\yourusername\Documents\Downloads\apache_2.2.11-win32-x86-openssl-0.9.8i.msi” (your apache .msi file may be named differently and your download directory may be different)
  8. Enter the following (unless you know better): Network Domain = localhost, Server Name = localhost, admin email = your@email
  9. Installation directory, choose C:\Apache instead of C:\Program Files\bla bla bla\. One of the reasons is as I have been told, that the Program Files directory gives you all sorts of problems when you want to read and write your files. In my failed attempts to install php and apache, php installation was not able to write to httpd.conf and could not install, failed apache installation could not write log files and I could not update index.html.
  10. I still got a bunch of error messages after installation and could not start Apache via the Apache Service Monitor, so reboot to the rescue. After that I could start apache.

Now that Apache was installed it was time to install php:

  1. Downlaod php (my version 5.2.9) msi file
  2. Make sure UAC is still turned off (see apache installation above)
  3. Start -> All Programs -> Accessories -> Command Prompt -> Right Click -> Run as Administrator
  4. Run: ”msiexec /i C:\Users\yourusername\Documents\Downloads\php-5.2.9-win32-installer.msi” (your php .msi file may be named differently and your download directory may be different)
  5. Web Server Setup -> Choose your webserver, in my case Apache 2.2.x Module
  6. Apache Configuration Directory, in my case “C:\Apache\conf\”. In any case it is the conf directory of your apache installation.
  7. Extensions to install, in my case MySQL
  8. Installation directory, I chose C:\PHP instead of the suggested “Program Files” dir for reasons mentioned above.
  9. Strange enough, you still need to make some modifications to apache’s conf/httpd.conf file, so open it with a text editor like vim or jEdit.
  10. You will find the following lines at the end of the file:  PHPIniDir “C:/PHP/” and LoadModule php5_module “C:/PHP/php5apache2_2.dll”
  11. What is missing are the lines “AddType application/x-httpd-php .php” and “AddType application/x-httpd-php-source .phps” in the section “<IfModule mime_module>”. For example just add these lines after the entry for x-gzip. Make sure you do not have any unnecessary spaches in the mime type like I saw in one of the tutorials I googled.
  12. Reboot your machine, apache should be running.
  13. Create a file test.php in htdocs with something like <?php phpinfo(); ?> and navigate to http://localhost/test.php and you should see your php output.

I sincerely hope that I was able to help somebody save some time by giving a few pointers. Of course there are many more things that can and must be configured to get the setup just right for your purposes but the basic installation should now be working.

If you have the choice of your underlying operating system why not try to setup Apache and php on OpenSolaris or Linux? You will find installation easy by using the build in package manager, no hassle with UAC, no need for additional configuration, no non-writeable directories, no need for reboots. It is a simple, straightforward process that works out of the box.