[SOLVED] install.sh only for ubuntu, debian and fedora

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Snehalinux

[SOLVED] install.sh only for ubuntu, debian and fedora

Post by Snehalinux »

I was trying to install mininet-wifi
the last step was the command util/install.sh which gave the following error:
"Detected Linux distribution: LinuxMint 18.3 sylvia amd64
Install.sh currently only supports Ubuntu, Debian and Fedora."
What does this mean and what do i do?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
xenopeek
Level 25
Level 25
Posts: 29595
Joined: Wed Jul 06, 2011 3:58 am

Re: install.sh only for ubuntu, debian and fedora

Post by xenopeek »

The install.sh script uses the old lsb_release command to find out which distro you're using, instead of the newer /etc/os-release file. Ideally the mininet-wifi developers change their script to use the /etc/os-release file as that includes information about both the distro being used and the distro it's based on—the latter which this script needs. It needs to know if you're using Linux Mint based on Ubuntu or Debian, and which Ubuntu or Debian version, and only /etc/os-release provides that information. The lsb_release command doesn't give that info. This would make the script work on all Ubuntu and Debian derived distros.

Perhaps you can suggest that to the developers as an improvement (documentation for /etc/os-release https://www.freedesktop.org/software/sy ... lease.html). For now, you'll have to edit the install.sh script to make it work.

Below is an ugly hack but will work. Do the following:

Find the block of code in the install.sh file that start with the line test -e /etc/debian_version && DIST="Debian" (line 37 at my end) and delete it and the lines following it up to BUT NOT INCLUDING the line echo "Detected Linux distribution: $DIST $RELEASE $CODENAME $ARCH" (line 65 at my end).

Now, before the line echo "Detected Linux distribution: $DIST $RELEASE $CODENAME $ARCH" insert the following lines:

Code: Select all

install='sudo apt-get -y install'
remove='sudo apt-get -y remove'
pkginst='sudo dpkg -i'
update='sudo apt-get'
And after those lines insert the following lines, if you're using Linux Mint 18.x:

Code: Select all

DIST="Ubuntu"
RELEASE="16.04"
CODENAME="xenial"
Or these lines for Linux Mint 19:

Code: Select all

DIST="Ubuntu"
RELEASE="18.04"
CODENAME="bionic"
Or these lines for LMDE 3:

Code: Select all

DIST="Debian"
RELEASE="9.3"
CODENAME="stretch"
I think that should cover it and the install.sh should now work.

Ideally the
Image
Snehalinux

Re: install.sh only for ubuntu, debian and fedora

Post by Snehalinux »

Thanks a ton!!!
That seemed to get it working.. :)
Snehalinux

Re: install.sh only for ubuntu, debian and fedora

Post by Snehalinux »

I ran into the following error now: install: unbound variable for the lines
$install wireless-tools rfkill ${PYPKG}-numpy pkg-config \
libnl-3-dev libnl-genl-3-dev libssl-dev make libevent-dev patch \
${PYPKG}-scipy ${PYPKG}-matplotlib

Is it because of the edit you suggested or does this question lie outside linux-mint specific questions?
User avatar
xenopeek
Level 25
Level 25
Posts: 29595
Joined: Wed Jul 06, 2011 3:58 am

Re: install.sh only for ubuntu, debian and fedora

Post by xenopeek »

My bad. Deleted too many lines from the script. Amended my post above. Where you deleted the lines you should also add these lines back into the script:

Code: Select all

install='sudo apt-get -y install'
remove='sudo apt-get -y remove'
pkginst='sudo dpkg -i'
update='sudo apt-get'
Image
Snehalinux

Re: install.sh only for ubuntu, debian and fedora

Post by Snehalinux »

Thankyou so much!!!! It worked!
Locked

Return to “Beginner Questions”