I am trying to install ruby1.8 on Ubuntu 14.04 so that I can be able to run a work application. When i run this command:
sudo apt-get install build-essential ruby1.8-dev ruby-dev mysql-client mysql-server git-core libmysql-ruby libmysqlclient-dev unzip rubygems
I get these errors below:
Building dependency tree
Reading state information…
Done
build-essential is already the newest version.
git-core
is already the newest version.
ruby-dev is already the newest
version.
unzip is already the newest version.
libmysqlclient-dev is already the newest version.
mysql-client is
already the newest version.
mysql-server is already the newest
version.
ruby1.8-dev is already the newest version.
rubygems
is already the newest version.
libmysql-ruby1.8 is already the
newest version.
0 upgraded, 0 newly installed, 0 to remove and 161
not upgraded.
1 not fully installed or removed.
After this
operation, 0 B of additional disk space will be used.
Do you want
to continue? [Y/n] y
Setting up rubygems (1.8.25-1bbox3~trusty1)
…
update-alternatives: error: alternative path /usr/bin/gem1.8
doesn’t exist
dpkg: error processing package rubygems
(—configure):
subprocess installed post-installation script
returned error exit status 2
Errors were encountered while
processing:
rubygems
E: Sub-process /usr/bin/dpkg returned an
error code (1)
lusekero_mwathengere@lusekero:~$
Please help….I know ruby1.8 is an old version but this is what we are using at work so I need to succeed in this installation.
Thanks, in advance, for any help rendered.
asked Jan 7, 2015 at 14:35
1
I ran into a similar error message while putting ruby on rails on AWS:
Setting up rubygems (1.8.25-1bbox3~trusty1) ...
update-alternatives: error: alternative path /usr/bin/gem1.8 doesn't exist
dpkg: error processing package rubygems (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
rubygems
E: Sub-process /usr/bin/dpkg returned an error code (1)
The solution was to manually install the library for the missing alternative path. in ubuntu:
sudo apt-get install rubygems1.8
This allowed my install script to find the requested files.
answered Mar 11, 2015 at 21:57
hanmarihanmari
1,33412 silver badges19 bronze badges
1
This worked for me:
sudo apt-get install rubygems1.8
update-alternatives --set ruby /usr/bin/ruby1.8
answered Aug 1, 2015 at 10:31
robgrobg
511 silver badge3 bronze badges
In this article, we will upgrade to python 3.10 and configure it as the default version of python in Ubuntu 18.04 and 20.04 LTS.
The current stable version of python was released on 06 Dec. 2021. Many ubuntu users are facing problems during upgrading python to the latest version. Python 3.9 is available as default when we install Ubuntu 20.04 LTS and Python 3.8 is available in Ubuntu 18.04. Python 3.10.0 is not available in default Ubuntu 18.04 and 20.04 repositories.
- Also Read: How to upgrade to Python 3.9 on Ubuntu 18.10
So let’s start with checking the currently installed version of Python on your system.
python3 -V
As seen in the image above, my currently installed Python version is 3.8.10 but yours may differ.
Install Python 3.10
Follow the simple steps to install and configure Python 3.10
Step 1: Add the repository and update
Latest Python 3.10 is not available in Ubuntu’s default repositories. So, we have to add an additional repository. On launchpad repository named deadsnakes is available for Python Packages.
Add the deadsnakes repository using the below commands.
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
Update the package list using the below command.
apt-get update
Verify the updated Python packages list using this command.
apt list | grep python3.10
As seen in the image above, Now we have Python 3.10 available for installation.
Step 2: Install the Python 3.10 package using apt-get
install Python 3.10 by using the below command :
sudo apt-get install python3.10
Step 3: Add Python 3.8 & Python 3.10 to update-alternatives
Add both old and new versions of Python to Update Alternatives.
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
Step 4: Update Python 3 for point to Python 3.10
By default, Python 3 is pointed to Python 3.8. That means when we run python3 it will execute as python3.8 but we want to execute this as python3.10.
Type this command to configure python3:
sudo update-alternatives --config python3
You should get the above output. Now type 2 and hit enter for Python 3.10. Remember the selected number may differ so choose the selection number which is for Python 3.10.
Step 5: Test the version of python
Finally, test the current version of python by typing this :
python3 -V
You should get Python 3.10 as output.
In this article, we learn how to upgrade python to the latest version that is 3.10 in Ubuntu 20.04 and 18.10.
Share your thoughts in the comment section. Happy Learning …!!
- Also Read: How to Install Asterisk 16 on Ubuntu 18.04 LTS
how to install python in ubuntu, how to install python in ubuntu 20.04, how to upgrade python in ubuntu, install latest python in ubuntu, install python 3.10, install python 3.10 ubuntu, install python in ubuntu, python 3.10, python in ubuntu 18, python in ubutnu, ubuntu 18.04 lts bionic beaver, Ubuntu 20.04 LTS, upgrade python in ubuntu, upgrade to python 3.10 ubuntu 18.04, upgrade to python 3.10 ubuntu 20.04
This div height required for enabling the sticky sidebar
- Forum
- The Ubuntu Forum Community
- Ubuntu Official Flavours Support
- New to Ubuntu
- [ubuntu] Alternative Path Doesn’t Exist Error
-
Alternative Path Doesn’t Exist Error
When i try to install build-esential using
Code:
sudo apt-get install build-essential
I get the error
Code:
update-alternatives: error: alternative path /usr/bin/gcc doesn't exist
Any ideas on how to fix this?
-
Re: Alternative Path Doesn’t Exist Error
Hi
Please post the output, from a terminal, for these commands
Code:
update-alternatives --get-selections | grep gcc
Code:
update-alternatives --display cc
Code:
dpkg-divert --list "*gcc*"
and finally.
Code:
sudo apt-get -f install
Kind regards
If you believe everything you read, you better not read. ~ Japanese Proverb
If you don’t read the newspaper, you’re uninformed. If you read the newspaper, you’re mis-informed. — Mark Twain
Thinking about becoming an Ubuntu Member?
-
Re: Alternative Path Doesn’t Exist Error
Originally Posted by matt_symes
Hi
Please post the output, from a terminal, for these commands
Code:
update-alternatives --get-selections | grep gcc
Code:
update-alternatives --display cc
Code:
dpkg-divert --list "*gcc*"
and finally.
Code:
sudo apt-get -f install
Kind regards
Code:
doudou@Pumpkin-Ubuntu:~$ ls -l /usr/bin/gcc lrwxrwxrwx 1 root root 7 Mar 13 2012 /usr/bin/gcc -> gcc-4.6
Code:
doudou@Pumpkin-Ubuntu:~$ sudo dpkg -l gcc Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ iF gcc 4:4.6.3-1ubunt GNU C compiler
Code:
sudo dpkg --audit The following packages have been unpacked but not yet configured. They must be configured using dpkg --configure or the configure menu option in dselect for them to work: g++ GNU C++ compiler build-essential Informational list of build-essential packages The following packages are only half configured, probably due to problems configuring them the first time. The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect: gcc GNU C compiler
Code:
doudou@Pumpkin-Ubuntu:~$ update-alternatives --get-selections | grep gcc doudou@Pumpkin-Ubuntu:~$
Code:
doudou@Pumpkin-Ubuntu:~$ update-alternatives --display cc update-alternatives: error: no alternatives for cc.
Code:
doudou@Pumpkin-Ubuntu:~$ sudo dpkg-divert --list "*gcc*" doudou@Pumpkin-Ubuntu:~$
Code:
doudou@Pumpkin-Ubuntu:~$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up gcc (4:4.6.3-1ubuntu5) ... update-alternatives: error: alternative path /usr/bin/gcc doesn't exist. dpkg: error processing gcc (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of g++: g++ depends on gcc (>= 4:4.6.3-1ubuntu5); however: Package gcc is not configured yet. dpkg: error processing g++ (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of build-essential: build-essential depends on gcc (>= 4:4.4.3); however: Package gcc is not configured yet. build-essential depends on g++ (>= 4:4.4.3); however: Package g++ is not configured yet. dpkg: error processing build-essential (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: gcc g++ build-essential E: Sub-process /usr/bin/dpkg returned an error code (1)
thanks!
-
Re: Alternative Path Doesn’t Exist Error
Hi
Try this from the terminal
Code:
sudo apt-get -f install
Post back any errors.
Kind regards
If you believe everything you read, you better not read. ~ Japanese Proverb
If you don’t read the newspaper, you’re uninformed. If you read the newspaper, you’re mis-informed. — Mark Twain
Thinking about becoming an Ubuntu Member?
Bookmarks
Bookmarks
Posting Permissions
Ответ на:
комментарий
от Karthago 17.08.18 11:48:11 MSK
Вывод update-alternatives —display x-www-browser в студию.
update-alternatives: error: no alternatives for x-www-browser
- Показать ответ
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 17.08.18 12:07:16 MSK
Ответ на:
комментарий
от Karthago 17.08.18 13:09:27 MSK
sudo update-alternatives —install /usr/bin/x-www-browser x-www-browser /path/to/firefox 200
update-alternatives: error: alternative path /path/to/firefox doesn't exist
sudo update-alternatives —config x-www-browser
update-alternatives: error: no alternatives for x-www-browser
- Показать ответ
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 17.08.18 14:35:55 MSK
Ответ на:
комментарий
от MikeWortin 17.08.18 15:31:25 MSK
это надо было поменять на путь к firefox’y
Сорян, не знал, спасибо за подсказку) Вот что получилось:
test@test:~$ sudo update-alternatives --install /usr/bin/x-www-browser x-www-browser /opt/firefox 200
update-alternatives: using /opt/firefox to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
test@test:~$ sudo update-alternatives --config x-www-browser
There is only one alternative in link group x-www-browser (providing /usr/bin/x-www-browser): /opt/firefox
Nothing to configure.
Но всё равно не работает..
Karthago
- Показать ответы
- Ссылка
Ответ на:
комментарий
от MikeWortin 17.08.18 15:31:25 MSK
Сообщение выше, и вот еще дополняю:
update-alternatives --display x-www-browser
x-www-browser - auto mode
link best version is /opt/firefox
link currently points to /opt/firefox
link x-www-browser is /usr/bin/x-www-browser
/opt/firefox - priority 200
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 17.08.18 15:54:07 MSK
Ответ на:
комментарий
от TheLinuxUser 17.08.18 15:54:07 MSK
Ответ на:
комментарий
от Karthago 17.08.18 15:56:45 MSK
Какое поведение у команды x-www-browser https://google.ru?
test@test:~$ x-www-browser https://google.ru
bash: x-www-browser: команда не найдена
не путь к папке файрфокса, а путь к его исполняемому файлу
MikeWortin, там внутри лежит исполняемый файл «firefox». Нужно было /opt/firefox/firefox ?
- Ссылка
Ответ на:
комментарий
от MikeWortin 17.08.18 15:57:35 MSK
Вбил путь к исполняемому файлу, теперь не знаю как удалить) Выводит:
test@test:~$ update-alternatives --display x-www-browserx-www-browser - manual mode
link best version is /opt/firefox/firefox
link currently points to /opt/firefox/firefox
link x-www-browser is /usr/bin/x-www-browser
/opt/firefox - priority 200
/opt/firefox/firefox - priority 200
- Показать ответ
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 17.08.18 16:04:55 MSK
Ответ на:
комментарий
от Karthago 17.08.18 16:10:23 MSK
Ответ на:
комментарий
от TheLinuxUser 17.08.18 18:05:25 MSK
Ответ на:
комментарий
от Karthago 17.08.18 20:25:41 MSK
sudo update-alternatives --set x-www-browser /opt/firefox/firefox
Не сработало, браузер так и не открывает со сторонних приложений. Перезагружать на всякий случай пробовал.
- Показать ответы
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 20.08.18 19:21:16 MSK
Что он у тебя делает в /opt? Ты его не из реп ставил? Ох уж этот дебиан, вторая венда прям.
anonymous
(21.08.18 00:39:19 MSK)
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 20.08.18 19:21:16 MSK
Ответ на:
комментарий
от TheLinuxUser 20.08.18 19:21:16 MSK
Покажи ещё раз вывод x-www-browser https://google.ru
и update-alternatives --display x-www-browser
Ну, и как крайний вариант, можно руками сделать симлинк x-www-browser на firefox
sudo ln -s /opt/firefox/firefox /usr/bin/x-www-browser
Karthago ★★
(21.08.18 13:03:22 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от anonymous 21.08.18 01:38:08 MSK
Что он у тебя делает в /opt? Ты его не из реп ставил? Ох уж этот дебиан, вторая венда прям.
Из репозитория не хотел устанавливать.
покажи вывод команды whereis firefox
- Ссылка
Ответ на:
комментарий
от Karthago 21.08.18 13:03:22 MSK
Покажи ещё раз вывод
x-www-browser https://google.ru и update-alternatives --display x-www-browser
x-www-browser https://google.ru
Бросает в гугл (нормально)
update-alternatives --display x-www-browser
x-www-browser - manual mode
link best version is /opt/firefox/firefox
link currently points to /opt/firefox/firefox
link x-www-browser is /usr/bin/x-www-browser
/opt/firefox - priority 200
/opt/firefox/firefox - priority 200
Ну, и как крайний вариант, можно руками сделать симлинк x-www-browser на firefox
sudo ln -s /opt/firefox/firefox /usr/bin/x-www-browser
Пишет что файл уже существует.
- Показать ответ
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 29.08.18 10:24:50 MSK
Странно, по идее всё уже должно работать.
На всякий можешь попробовать:
sudo mv /usr/bin/x-www-browser /usr/bin/x-www-browser_bak
sudo ln -s /opt/firefox/firefox /usr/bin/x-www-browser
Но если и это не сработает, то у меня идей больше нет.
Karthago ★★
(31.08.18 19:55:52 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от Karthago 31.08.18 19:55:52 MSK
Странно, по идее всё уже должно работать.
На всякий можешь попробовать:
sudo mv /usr/bin/x-www-browser /usr/bin/x-www-browser_bak sudo ln -s /opt/firefox/firefox /usr/bin/x-www-browser
Но если и это не сработает, то у меня идей больше нет.
Не сработало и это..
- Показать ответ
- Ссылка
Ответ на:
комментарий
от TheLinuxUser 02.09.18 09:30:13 MSK
Такой совет не пробовали («настройки любимой DE»)?
«приоритет 200» на что влияет? посмотрел у себя: только 70 стоит (но firefox «встроенный»).
anymouze ★★
(02.09.18 12:20:55 MSK)
- Ссылка
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.