Archive

Archive for the ‘Uncategorized’ Category

Updating from Ubuntu 22.04 to Ubuntu 23.04

April 21st, 2023 No comments

Now that Ubuntu 23.04 has been released this is the steps to update from 22.04

Of course, this assumes that you are on 22.04.
This guide is very “brief”, if you are not sure what a command does, please look it up first and make sure you know what you are doing.

If you brick your release, don’t blame me, do your homework first šŸ™‚

Update everything

Update everything and install the update managed, (you probably have it already)

sudo apt update && sudo apt upgrade -y && sudo apt install update-manager-core -y

You might be asked a couple of questions, just say yes

When this is done you need to update the manager to tell it that you can update to the next release version

Open the editor and change the upgrade policy

sudo nano /etc/update-manager/release-upgrades

Change the “prompt” to “normal”, (press Ctrl-0 to save and Ctrl-X to exit)

Change the source list to now look at the “lunar” instance instead of “jammy”

sudo sed -i ā€˜s/jammy/lunar/gā€™ /etc/apt/sources.list

Update everything … again

sudo apt update && sudo apt upgrade -y

Do the actual update

sudo apt dist-upgrade -y

You will be asked a few questions, it really depends on your environment and setup.

Most questions are fairly straight forward, so say yes to everything.

You will also be asked to remove/replace certain things.
Just read the messages carefully, most of them are fairly simple to understand.

Done

You are now done, so just reboot, (takes a bit longer).

sudo reboot

Once the reboot is done, you can check the version number.

Categories: Ubuntu, Uncategorized Tags:

Deleting folders that refuse to be deleted…

September 13th, 2017 Comments off

Sometimes when you want to delete a folder in windows you get a very useful message “Could not find this item… this is no longer located in …”, (yes, the very item you just tried to delete).

So after a bit of cursing, making sure that you are indeed the admin of this box, praying to the windows gods you realise that maybe Windows Explorer is at fault.

Not to worry you think, you open up a cmd line console and navigate to the parent of the offending folder.

And like a true hacker you type

“rd c:\my\bad\folder”

only to be told once again, “The system cannot find the file specified.”

At this point your realise that the folder has spaces… so you think “no problem, I will quote the folder” and you now type

‘rd “c:\my\bad\folder “‘

with the correct number of spaces in the folder name.

Long story short… you cannot do that.

You cannot rename the folder, (I know you will try anyway, but you can’t)

So you Googled for a solution and here you are…

what you need to do is tell the command line to not trim the folder name and to do that, you have to add “\?\” in front, so now you type

‘rd /s /q “\\?\c:\my\bad\folder “‘

Complete with the extra spaces and so on… (I added the /s and /q flags because you forgot that the directory is not empty)

Debug Google test with Eclipse

August 13th, 2017 Comments off

You can add the google test library to Eclipse so you can compile the code, but you might want to actually build the whole thing at once without having to link libraries and whatever.

Of course this is possible as the full code is given to you…

  • Go to the Google Test Github project and download the latest release.
  • Unpack it whereever you want, and, of course make note of the project.
    We will call that folder <gfolder>
  • You then need to include the Google test file path, in eclipse,
    • The root of Google folder, “C/C++ build > Settings > Includes > Add include path” for <gfolder>
    • The include folder, “C/C++ build > Settings > Includes > Add include path” for <gfolder>, where the source files are included.

Then in you main( … ){ … } where you would normally include #include “gtest/gtest.h” or #include <gtest/gtest.h> add “#include “src/gtest-all.cc””

#include “src/gtest-all.cc”
#include “gtest/gtest.h”

int main(int argc, char** argv)
{
printf(“Running main() from gtest_main.cc\n”);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}

Categories: development, Uncategorized Tags:

Common issues with php-Apache installs

January 7th, 2011 Comments off

1- You see code instead of the script been run

Locate the file called httpd.conf and make sure you have something like

PHPIniDir “C:/Program Files (x86)/php”
AddType application/x-httpd-php .php .php5
LoadModule php5_module “C:/Program Files (x86)/php/php5apache2_2.dll”

And restart the Apache server

2- httpd.conf is either located in

C:\Program Files (x86)\Apache Software Foundation\Apache2.2\
or
C:\Program Files (x86)\Apache Software Foundation\Apache2.2\conf

I’ll add more later as I think of them…

Categories: development, Uncategorized Tags: ,