Go Premium for a chance to win a PS4. Enter to Win

x

Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.

Share tech news, updates, or what's on your mind.

Sign up to Post

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once you download and install Linux Mint 17.2, Python software is installed by default. But the latest releases from Python are Python 2.7.10 and Python 3.4.3. I am using a 32 bit operating system as my host is 32 bit but you can still go ahead with 64 bit version which is preferred.

Log into the Mint operating system, and open terminal. Type "python" and hit enter or you can type "python --version" to check the existing version.
swadhin.ray-000036.pngTo download the latest version of Python, open https://www.python.org/downloads/ and click on "Download Python-2.7.10" as shown in below image.
swadhin.ray-000037.pngOpen the folder where the file is downloaded. In my system it's defaulted to "Downloads" folder.
swadhin.ray-000038.png
swadhin.ray-000039.pngIf you open the tar file from the archive manager you can see the files that were downloaded.
swadhin.ray-000040.pngNow extract all the files under the same folder or you can choose a specific directory. Click on Extract button as shown below.
swadhin.ray-000041.pngswadhin.ray-000042.pngWait till the file get extracted.
swadhin.ray-000043.pngNow from the above image we can we can see that file is successfully extracted.
swadhin.ray-000044.pngNow open terminal and locate the extracted installation files.

Open in new window

1
 

Expert Comment

by:MeganDS
Comment Utility
When I executed "./configure", you said it shouldn't have any errors, but mine did. When I did that, I got this output:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for --enable-universalsdk... no
checking for --with-universal-archs... 32-bit
checking MACHDEP... linux2
checking EXTRAPLATDIR... 
checking for --without-gcc... no
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/sara/Downloads/Python-2.7.10':
configure: error: C compiler cannot create executables
See `config.log' for more details

Open in new window


What can I do to fix this?
0
 
LVL 16

Author Comment

by:Swadhin Ray
Comment Utility
what is your OS version seems you are installing 64/bit on 32 .
0
Learn Veeam advantages over legacy backup
LVL 1
Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additional drivers, for example Nvidia or ATI cards.
I am using a Minti OS on virtual machine, but when I tried to change the resolution I am not able to select anything.

Here are the steps to identify if the problem exist on your operating system.
swadhin.ray-000024.pngType Display on the search and click on the Display options as shown in above screen. Now if we try to select the drop down option from Resolution attribute then I am not able to select anything other than 640 x 480. It also has the same problem on other attributes like Refresh rate and Rotation. Finally when clicked on Detect monitors nothing happens: still shows the same problem.
swadhin.ray-000025.pngWe might see the "Unknow " message under Monitor attribute.
swadhin.ray-000026.pngTo fix this let's open terminal.
swadhin.ray-000027.pngType "sudo apt-get install mesa-utils" and provide your root password or if your existing user is a super user then use the same password.
swadhin.ray-000028.pngThis will install the mesa-utils package. Restart or reboot your OS.
swadhin.ray-000029.pngTo verify the installtion type " glxinfo | grep render " once your system is restarted:
swadhin.ray-000030.pngProvide the password to login.

swadhin.ray-000032.pngOnce restarted open terminal and type "glxinfo | grep render " and then type "glxgears".
swadhin.ray-000031.pngOnce done check the display again to verify if the issue is fixed or not.
swadhin.ray-000035.png
1
 
LVL 27

Expert Comment

by:tliotta
Comment Utility
If you have more Mint articles in mind, I'll be a reader. This article actually gave me an idea for a similar problem on a non-Mint distro (though Mint is my personal standard).
0
 
LVL 16

Author Comment

by:Swadhin Ray
Comment Utility
@tliotta : Thanks for your comments , Yes I do have few things in my mind will try to submit soon.
0
Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command line interface of advanced systems like Unix, Linux, BDS, and so on, scripting with bash helps you to avoid the hassle of repeating tasks, but is this possible when you have to get your information from some webpage?

A simple example taken from real life

I will describe how to get such information from the Internet. Suppose that I need to know when it is high tide in Antwerp. You can get that information from a table that you can find at http://www.skynet.be/nieuws-sport/weer/mijn-weer?cityId=6450, where 6450 is the code for the city of Antwerp.

By inspecting the HTML code of this page, you can discover that the information you are looking for stays inside of a div tag which has "tides" as class attribute. If you use Firefox, you can easily find it by right clicking on the information you want to localise and select Inspect Element (Q) in the pop-up menu.

Extracting information from a webpage

The program I am using for extracting a part of an HTML page is xmllint which is a part of the libxml2-utils package in the Ubuntu distribution. The utility xmllint has an option which is called --xpath that allows you to describe which part of the HTML file you want to select. We want to select the content of the webpage under the div
2
 
LVL 5

Expert Comment

by:magento
Comment Utility
Very nice article, thanks,
0
 
LVL 4

Expert Comment

by:Davy Paridaens
Comment Utility
I see endless possibilities  with this method of getting data and storing it in a database. A very nice article!
0

Linux OS Dev

Kernel programming for Linux operating systems can be done with many different languages; C, C++, Python, Perl and Java, which are some of the most common languages used.There are also many different varieties of Linux, such as Ubuntu, Fedora and OpenSUSE.