I had to find out that the build process isn't so easy to solve. However I found another approach for you to get the old version of gedit
and gedit-r-plugin
up and running.
First removing the traces of your gedit compiling and installing tries (change the paths respectively to fit your situation).
cd ~/your build dir of gedit-plugins/
sudo make uninstall
cd ~/your build dir of gedit/
sudo make uninstall
The next command uninstalls the eventually existing 3.18.3 version of gedit
, gedit-dev
, gedit-plugins
and gedit-common
.
sudo apt-get remove gedit gedit-dev gedit-plugins gedit-common
Best to do the following steps in a clean seperate directory.
Now downloading the proper dependencies package for gedit-common 3.10.4
and installing it.
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gedit/gedit-common_3.10.4-0ubuntu13_all.deb
sudo dpkg -i gedit-common_3.10.4-0ubuntu13_all.deb
Then downloading the proper gedit 3.10.4
package and installing it
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gedit/gedit_3.10.4-0ubuntu13_amd64.deb
sudo dpkg -i gedit_3.10.4-0ubuntu13_amd64.deb
And downloading the proper gedit-dev 3.10.4
package and installing it.
wget http://mirrors.kernel.org/ubuntu/pool/main/g/gedit/gedit-dev_3.10.4-0ubuntu13_amd64.deb
sudo dpkg -i gedit-dev_3.10.4-0ubuntu13_amd64.deb
Finaly downloading the proper gedit-plugins 3.10.1
package
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gedit-plugins/gedit-plugins_3.10.1-1ubuntu3_amd64.deb
We need to unpack this downloaded .deb file because we need to do two changes (sudo keps the packages owner intact).
sudo dpkg-deb -R gedit-plugins_3.10.1-1ubuntu3_amd64.deb tmp
First we are editing tmp/DEBIAN/control
and change python3 (<< 3.5), python3 (>= 3.4~), python3.4
to python3 (>= 3.5~), python3.5
.
sudo nano tmp/DEBIAN/control
Then we edit tmp/DEBIAN/postinst
and change py3compile -p gedit-plugins /usr/lib/x86_64-linux-gnu/gedit/plugins -V 3.4
to py3compile -p gedit-plugins /usr/lib/x86_64-linux-gnu/gedit/plugins -V 3.5
.
sudo nano tmp/DEBIAN/postinst
Now we can pack a new .deb file.
sudo dpkg-deb -b tmp gedit-plugins_3.10.1-1ubuntu4_amd64.deb
And changing ownership of the new .deb file (replace username with your username)
sudo chown username:username gedit-plugins_3.10.1-1ubuntu4_amd64.deb
Now finally installing it.
sudo dpkg -i gedit-plugins_3.10.1-1ubuntu4_amd64.deb
And now we download the proper gedit-r-plugin 0.8.0.2
package and install it.
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gedit-r-plugin/gedit-r-plugin_0.8.0.2-Gtk3-Python3-1ubuntu1_all.deb
sudo dpkg -i gedit-r-plugin_0.8.0.2-Gtk3-Python3-1ubuntu1_all.deb
Only thing now left is protecting this all from upgrading.
sudo apt-mark hold gedit-common gedit gedit-dev gedit-plugins gedit-r-plugin
Best Answer
The solution is quite complicated so make sure you read and proceed carefully. As preparation to this make sure you enabled all packet sources so your
/etc/apt/sources.list
looks like this and do an upgrade:To install the old version:
Then as a first step, you need to remove the existing version of gedit. To do so run the following commands in your terminal (ctrl+alt+t):
Now prepare a directory to work in. For convenience we do that in our home directory.
Next step is to create a
wget-list
file to make the download easier (you can copy and paste the whole field into your terminal). If you're not using a 64-bit system you might want to find the proper links for i386 here.Now you have that
wget-list
file, you can download everything in one go by typingwget -i wget-list
, let the files download and then begin your installation.Please follow below steps one by one and if you run into dependency errors simply do
sudo apt-get remove <package-name>
which reflects the package giving trouble, then install the dependencies by hand withsudo apt-get install <package-name>
then do the dpkg line again. Do not, and I mean do not runsudo apt-get -f install
while you're trying this installation: it will mess everything up.Now, let's begin with the essential packages (tested and working on a clean 16.04 LTS installation):
The following packages are only optional and you should be able to install them easily, the dependencies to download are given and tested on a clean 16.04 LTS install like the above.
Now you have to make sure the packages won't be changed when you run an update, so ensure only to state the packages you have installed:
To reverse the whole process do:
Is there a script to do it?:
Yes I made even a script to automate the whole process, you can get it here or by:
Then to run it:
This will create a custom file for you called
gupgrade.sh
which allows you to reverse the whole process by simply: