Sublime 3 error installing package control - sublimetext3

I am trying to install package control in Sublime Text editor 3 on Ubuntu 14.04 . I follow simple instruction from https://sublime.wbond.net/installation.
But I get follow error:
Package Control: Error downloading channel. b'curl: (7) Failed to connect to sublime.wbond.net port 443: Network is unreachable' downloading https://sublime.wbond.net/channel.json.
error: Package Control

Go back to the installation page and follow the instructions in the Manual section:
Click the Preferences > Browse Packages… menu
Browse up a folder and then into the Installed Packages/ folder
Download Package Control.sublime-package and copy it into the Installed Packages/ directory
Restart Sublime Text
This should install Package Control for you without any problems.
EDIT
Please read through this issue here, and follow wbond's instructions to install from git. First, completely quit Sublime, then remove all traces of Package Control - any folders in ~/.config/sublime-text-3/Packages, any files in ~/.config/sublime-text-3/Installed Packages, the folder ~/.config/sublime-text-3/Packages/User/Package Control.cache, and any files in ~/.config/sublime-text-3/Packages/User that start with Package Control.* - Package Control.last-run, Package Control.sublime-settings, Package Control.system-ca-bundle, and anything else you can find.
Next, assuming you have git installed (run sudo apt-get install git if you don't), switch to ~/.config/sublime-text-3/Packages and run
git clone https://github.com/wbond/package_control.git "Package Control"
to clone the master repo (make sure you've completely quit Sublime before running this). Restart Sublime and see if everything installs properly. If not, follow the instructions for creating a debug log, restart Sublime to generate the log, open the Console by selecting View -> Show Console, then copy the entire contents (it'll be a lot) into a new file. Open a new issue and describe exactly what the problem is, including all the details above and the fact that you just installed from the master branch, and paste in the contents of the debug log (make sure you put it in a code block by adding triple backticks ``` before and after). Will Bond (wbond) should get in touch with some suggestions.
Good luck!
Note for users of other operating systems: I'm not sure if this is a Linux-only problem or not, but in case it isn't, Mac users will find Packages and Installed Packages in ~/Library/Application Settings/Sublime Text 3, while Windows users with standard (i.e., non-portable installs) will find them in your user directory under AppData\Roaming\Sublime Text 3. For Windows portable installs, the directories should be in your install directory under Data.

For the sublime text version 3126 onward Package Control is disabled by default. Just go to Preferences > Settings and remove Package Control from the ignored_packages setting.

I was having the same problem on Linux Mint 18.1 (Ubuntu derivative), and after reading a few posts here and there, it occurred to me that something had likely become corrupted, so I: 1) uninstalled sublime; AND then 2) deleted everything related to sublime from "/home/thom/.config/". Step 2 was the real key. Then I reinstalled sublime according to "apt" section HERE. Once reinstalled, package control was able to install without error.

Related

Failing to install Sublime Text 3 in Ubuntu 16.04 using apt-get command

I had downloaded sublime previously directly from the browser as tarball and saved it in a folder (and of course extracted it).But this way I wasn't able to make Sublime my default editor and it didn't feature as an application when I tried to open a text file with a right-click.I read somewhere installing sublime text 3 using commands:
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
will solve my problem. So I directly deleted the Sublime_text3 folder saved in my Downloads directory and then used the given commands. But when I entered the 3rd command line I got the following error(just writing the error part):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:/var/cache/apt/archives/sublime-text-installer_3126-2~webupd8~1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Can anyone explain why this error is coming and suggest a way to solve this problem? Also if anyone can tell how I can set Sublime as my default text editor from the tarball downloaded from the sublime text 3 website. Thanks in advance!
you can try this command to install Sublime Text using Snap Store..
sudo snap install sublime-text --classic
I'm not sure overall how to fix that error or what's going on (I use Slackware and not Ubuntu/Debian), but for a long while there have been official Sublime repositories several different Linux distributions, including Ubuntu/Debian.
It's highly recommended that you use those if you want to go the package route and not use existing solutions such as the one referenced in your question or in the other response here, if for no other reason than only the official repository is guaranteed to contain an unmodified version of Sublime. Additionally the official repositories are always updated on release, which may or may not happen in a timely manner in other repositories.
The links referenced above contain instructions on how to set up and use Sublime from those repositories, and if you have any issues a good place to ask is the forum.
One thing to note which isn't mentioned explicitly in the above pages is that to use the official repositories, you should:
Choose only one of them (stable or dev, noting that you need a license to run a dev version) and not add both repositories or things will not work as expected
Ensure that other repositories that you've added (such as the one in your question) are removed to make sure that the package system definitely pulls the correct package
There are a couple of ways to go if you want to install Sublime from the tarball version. The easiest way would be to extract it, then manually set up launcher shortcuts and so on based on what falls out. How exactly you would register it as a text editor in that case, I'm not entirely sure since I don't use the same distribution as you.
Presuming that the process would be easier if Sublime was installed in a way similar to how the package manager would do it, the tarball comes with a desktop file and icons, so the following steps can be used to (presumably) do what the package installer would do.
The proviso here is that although these steps work on my non-Ubuntu machine, I don't know if all of the referenced tools are installed by default on an Ubuntu system, so so more setup work may be involved.
Note also that the files in the tarball are not entirely self-consistent, which makes this a little bit more work.
First, you need to extract the tarball (replace tarball filename as appropriate for location and build):
cd /opt
sudo tar xvf ~/Downloads/sublime_text_3_build_3176_x64.tar.bz2
This creates the folder /opt/sublime_text_3/ and fills it with the contents of the tarball.
Next, you want to install the icons contained in the tarball. As far as I have been able to tell, the icons in the tarball aren't in the correct directory structure, requiring each to be copied into place individually. We also need to update the icon cache to ensure that the new icon is noticed by the system:
cd /usr/share/icons/hicolor/
sudo cp /opt/sublime_text_3/Icon/16x16/sublime-text.png 16x16/apps/
sudo cp /opt/sublime_text_3/Icon/32x32/sublime-text.png 32x32/apps/
sudo cp /opt/sublime_text_3/Icon/48x48/sublime-text.png 48x48/apps/
sudo cp /opt/sublime_text_3/Icon/128x128/sublime-text.png 128x128/apps/
sudo cp /opt/sublime_text_3/Icon/256x256/sublime-text.png 256x256/apps/
sudo gtk-update-icon-cache -f -t .
Now we want to install the sublime_text.desktop file that is in the tarball. Note however that like the icons, it seems kind of broken; the tarball extracts to sublime_text_3 but the desktop file assumes that the application is actually in /opt/sublime_text instead.
As such, you either need to rename the folder that was extracted to sublime_text to match what is in the desktop file, or edit the desktop file to make the path correct.
The following steps assume that we want to keep the folder the same and rewrite the desktop file. These commands will generate a new file named sublime_text_3.desktop with the changes.
cd /opt/sublime_text_3/
sed -e "s^/sublime_text/^/sublime_text_3/^" sublime_text.desktop | sudo tee sublime_text_3.desktop
Now you can install the desktop file. You do that with desktop-file-install, passing it the name of the desktop file. For accessing Sublime from the command line, you also want to set up a subl link to the installed copy of Sublime.
Adjust the paths as appropriate here if you decided to rename the folder instead of editing the desktop file:
sudo desktop-file-install sublime_text_3.desktop --rebuild-mime-info-cache
sudo ln -s /opt/sublime_text_3/sublime_text /usr/bin/subl
At this point Sublime should show up as an installed application, or at least it does in my Window Manager; if not, executing sudo update-desktop-database may help refresh it.
You can try this once. i hope it will help
wget https://download.sublimetext.com/files/sublime-text_build-4126_amd64.deb
sudo dpkg -i sublime-text_build-4126_amd64.deb

Having trouble installing new theme (Ubuntu 14.04)

I'm attempting to install the 'Iris Dark' theme on my Ubuntu 14.04 machine.
I'm using gnome-3, and the gnome tweak tool.
I've downloaded, extracted and then moved the theme into my theme folder like so.
unzip /home/admin/Desktop/IrisDark.zip /home/admin/Desktop/IrisDark
sudo cp -r /home/admin/Desktop/IrisDark /usr/share/themes
When I check the gnome tweak tool, it doesn't show up as a theme for either 'Windows' or GTK+. I am able to install other themes using the same method, only having trouble with this specific one.
When I try to open the folder I've just copied in my themes folder, I get 'This location could not be displayed, you do not have the nessecary permissions.."
This does not happen with any other themes I move into that folder, I only lack the read permission for this particular theme. I assume that the tweak tool is also running into that permissions error, and that's why it can't find it, I don't have any idea how I could fix this though.
EDIT: Moving the zipped file to the themes folder, and then unzipping it produces the same result.
The problem was eventually fixed by creating my own themes folder, which I had permissions over.
cd ~
mkdir .themes
cp -r /home/admin/Desktop/IrisDark ~/.themes
Turns out your not supposed to use the systems themes folder, but create your own.
I also experienced the same challenge. I will like to state the procedures that I took to make mine to work, and then you can check to see if you got it wrong somewhere.
Here are the steps
First install the Gnome Tweak Tool from the terminal
sudo apt-get install gnome-tweak-tool
Next, go to GNOME website GNOME Website and download the theme of your choice. They are usually in zipped files, and may be in various variants.
Extract the downloaded files to the ~/.themes/ (home/.themes) directory - to install for current user only. You can press Ctrl + H to show hidden folders. Create the themes folder if you don't have it yet.
Or sudo extract them to the /usr/share/themes/ (home/usr/share/themes) folder - to apply them globally.
sudo tar -xf Folder-Name.tar.xz -C /usr/share/themes
Restart GNOME Tweaks tool. You should see the manually installed GNOME themes in the Tweak tool now. You can configure or enable the newly installed themes here.
This technique for GTK Themes also applies for Icon Themes
That's all
I hope this helps

sublime text 3 and package control

I installed sublime text 3 editor and package control on my computer, but many of the packages only work on sublime text 2. However, I read articles on how branching to st3 could be a work around. But, I have no idea what that means, how can one branch to st3?
Please follow the instructions at: https://packagecontrol.io/installation
Do you mean in Package Control or for other packages? For Package Control, you need to manually clone the git repo. Then do git checkout python3. For installing packages, you need to add the branch URLs as an external repository. For example, one of my plugins that I have a ST3 branch on is AdvancedNewFile. To install the ST3 branch, I would have do the following.
In the command palette search for "Package Control: Add Repository"
In the input panel, insert https://github.com/skuroda/Sublime-AdvancedNewFile/tree/ST3
Install AdvancedNewFile normally through package control.
The URL can be found by clicking the Branch dropdown on github and selecting the appropriate branch.
If you want to use a Sublime 2 Package on Sublime 3, you can install the Package Manager as described here.
Then CTRL+ALT+P > Package Control: Add Repository > Paste the GitHub (or repository) URL > Install the package normally.
This doesn't guarantee the package will work, so you must check if there's a branch or something which is compatible with Sublime 3. I did that with freewizard/SublimeFormatSQL since one of the commits said 'Added Sublime Text 3 support', and it worked.
Sublime tries to write some config files to your .conf directory located in /home/{username}/.config/sublime-text-3/Installed Packages but it hasn't writing permission.
So try:
chmod -R 777 /home/{username}/.config/sublime-text-3/Installed Packages
Open the console and try to paste to code for sublime text 3.
Manual Installation
If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:
Click the Preferences > Browse Packages… menu and close sublime text 3
Browse up a folder and then into the Installed Packages/ folder
Download Package Control.sublime-package and copy it into the Installed Packages/ directory
go to this address https://github.com/wbond/package_control/blob/master/Package%20Control.sublime-settings
copy the code
open the copied downloaded "Package Control.sublime-package" in Installed Package (double click the package)
edit the file Package Control.sublime-settings in downloaded Package Control.sublime-package and replace the code that you copied in github
save and close Package Control.sublime-package
start Sublime Text 3 and wait to install package and restart
Its better to use the packages which are fully supported in your Sublime Text 3 version.
You can browse packages easily from: https://packagecontrol.io as well as see their compatibility.
Another method can be simply go to to your Sublime Text 3 > Install packages & Install the package you need. Here; you only see the packages supported in your Sublime Text 3 version.
Hope it helps...

RCP P2 updates in multi-user environment from read-only installation

I have created an Ubuntu package to install my RCP app. The installed files are owned by root. Is it possible for a user to subsequently install updates through P2? Documentation about Eclipse multi-user installs suggests that it is possible, along with the answer to this question.
However, when I start up the application, it does not automatically check for updates as usual, and the Update Site that I had specified in p2.inf is not listed in the "Install New Software..." dialog.
Using the -configuration or -data runtime options did not help.
I can make it work with a hack by running sudo chown -R <my_username> /opt/<my_app_installation>. When I subsequently launch the application, it does properly check for updates on startup, and my update site is properly listed in the "Install New Software..." dialog. Certainly I would prefer that whatever data it is writing to that installation directory be instead written to the user's home directory.
Supplementary info:
Here is a list of files and folders that showed up in my installation directory only after the directory was given ownership by <my_username> and the program was run.
/opt/<my_app_installation>/configuration/org.eclipse.core.runtime
/opt/<my_app_installation>/configuration/org.eclipse.equinox.app
/opt/<my_app_installation>/configuration/org.eclipse.osgi
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/1339896994308.profile.gz
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.scheduler.prefs
/opt/<my_app_installation>/p2/org.eclipse.equinox.p2.repository
More experimental results:
Even with a writable (chown'd) installation directory, no files are placed there when the
-configuration $HOME/.my_app_files runtime option is supplied.
There are lots of limitation of p2 itself for share install. AFAIK there is no significant improvement in latest release Juno as well.
But a guy from Redhat is working on p2 install with RPM package, you can read his progress in his blog post. The work and idea could be shared with Debian package.

unattended cygwin setup without setup.ini

I´m doin a unattended cygwin installation and I was wondering if there will occure any problems without a setup.ini.
Following: my "install-folder" includes a setup.exe and a subfolder release (within all the packages packed).
I´m starting the setup silent (with Nsis) and install the packages. In NSIS I define the Root, the location of the packages etc.
I think it works so far (I´m not sure because i´ve got a curious error in cmake). There are many instructions how to modify the whole setup for an offline installation. But I don´t get the point why I have to modify it at all.
I hope anyone has got experience with this issue!
#Daniel Le cygwin installs the packages without the .ini (all of them). And there has nothing to be downloaded because the packages are on the local machine.
I believe the setup.ini is essential to the setup process, as it indicates which packages to be downloaded and installed.
The Ini file is so far only a description for file locations and paths to be set as default. It is not necessary to have the ini file if you wanna install some packages!
That´s my conclusion.

Resources