Can not running command to run Code Composer - linux

Ubuntu Version: 19.10
Code Composer Version: CCS10.1.0.00010_linux-x64
I'm trying to install the Code Composer at Linux. But at README into Code Composer file, say this.
Code Composer Studio for Linux README
-----------------------------------------
Please note that use of anti-virus software or a firewall may cause issues
during installation. McAfee software in particular has been especially
troublesome. If possible, disable anti-virus and firewall software during
installation. If not, use of the Offline Installer is strongly recommended.
If you are using an Offline CCS Installer, the tar.gz file in which it is
distributed must first be extracted:
1. tar xfz CCSxx.x.x.xxxxx_linux-x64.tar.gz
2. cd CCSxx.x.x.xxxxx_linux
If you are using the Online/Web installer you need to extract the respective tar file
1. tar xfz CCSxx.x.x.xxxxx_web_linux-x64.tar.gz
Once extraction has successfully completed, proceed with the installation
steps below.
To install Code Composer Studio:
1. Execute ccs_setup_xx.x.x.xxxxx.run
2. Choose where you want to install.
3. Select the components you wish to install.
I extracted the file using the command
tar xfz CCS10.1.0.00010_linux-x64.tar.gz -C ../Documents/CodeComposer
I navigated to CodeComposer directory and used ls to see the files and I saw the file that the readme say to run.
So I wrote the command
ccs_setup_10.1.0.00010.run
And appeared this
zsh: command not found: ccs_setup_10.1.0.00010.run

Can you do ./ccs_setup_10.1.0.00010.run instead?
ccs_setup... is not on your path, so you need to give it a specific relative path so it knows where to look.

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

Installing Node in a linux grid server

So some background, I'm installing Node on a host server, but it's a grid server not a server that's solely for my website.
The grid server doesn't have a root user/ administrative powers. So to install node I found this workaround: http://iantearle.com/blog/media-temple-grid-and-nodejs . It's a Linux Grid server, I've never used Linux so if someone could explain to me what the commands mean, especially: ./configure --prefix=~/opt/
Lastly I followed the steps but when I try to run the node command in the server it says node:command not found - which is why I'm trying to understand the steps. Thanks
To explain the process:
Configure
The configure script is responsible for getting ready to build the software on your specific system. It makes sure all of the dependencies for the rest of the build and install process are available, and finds out whatever it needs to know to use those dependencies.
Unix programs are often written in C, so we’ll usually need a C compiler to build them. In these cases the configure script will establish that your system does indeed have a C compiler, and find out what it’s called and where to find it.
Make
Once configure has done its job, we can invoke make to build the software. This runs a series of tasks defined in a Makefile to build the finished program from its source code.
The tarball you download usually doesn’t include a finished Makefile. Instead it comes with a template called Makefile.in and the configure script produces a customised Makefile specific to your system.
3.Make Install
Now that the software is built and ready to run, the files can be copied to their final destinations. The make install command will copy the built program, and its libraries and documentation, to the correct locations.
--prefix=~/opt/ -> will set the build directory to /home/yourhome/opt directory.
Now if you didnt get errors while doing those 3 steps explained above make sure you did the following:
nano ~/.bash_profile
export PATH=~/opt/bin:${PATH}
nano is a text editor and you are opening .bash_profile file with it.
you need to add export PATH=~/opt/bin:${PATH} in that file and save it using ctrl+x
Then restart your terminal.
Specified github repository for nodejs is outdated. use the following link instead.
git clone https://github.com/nodejs/node.git
P.S node:command not found usually happens when the program is not installed correctly or it's executable isnt in your terminal's PATH variable.

Installing lapis on linux mint (alongside lua 5.3)

A few days ago I had a few problems while installing trying to install lapis on my new installation of linux mint. The main problem was that I wanted to have lua 5.3 as the main lua interpreter on my system, but lapis only works with lua 5.1.
This is how I ended up installing it
Note: Instructions for normal installation process, with aditional lua 5.3 being optional
Prerequisites
First of all install all the prerequisites with apt-get install libreadline-dev libncurses5-dev libpcre3-dev libssl-dev perl make build-essential*. This is all you should need to install lua, luarocks and openresty.
* copied from openresty website
Lua Interpreter(s)
Next, go to https://www.lua.org/versions.html and download the latest version of lua5.1 (wget https://www.lua.org/ftp/lua-5.1.5.tar.gz). Then extract the downloaded file tar -xf lua-5.1.5.tar.gz and optionally rename the directory mv lua-5.1.5 lua51.
Now you can simply build and install lua by moving to the directory cd lua51 and running make make linux and sudo make install
Aditionally, you might want to have lua5.3 installed on your system as the main lua interpreter. Luarocks doesn't seem to particularly like this kind of setup though, so I recommend the following:
First download and extract (and optionally rename) both lua5.1 and lua 5.3; go to the lua 5.1 directory and open Makefile in a text editor; Edit lines 12-15 to install lua in another directory. For me it worked to just add /lua51 to INSTALL_TOP (line 12). Next go to line 44 and change the names of the binaries (I chose lua51 and luac51), optionally do the same with the man pages (this requires also changing them in the doc subdirectory).
The next step is to go to the src/ directory and edit the makefile there as well: in lines 32 and 35 change the names as you did in the previous makefile (lua51 and luac51 in my case).
After this you can just make linux and sudo make install as described above.
Luarocks
Now you need to install luarocks on your system. Start by downloading the latest release of luarocks (http://keplerproject.github.io/luarocks/releases/) and extract it. Again, you can rename it to luarocks/ reduce typing. cd to the directory you just extracted and run ./condigure.
If you changed the lua installation path, you will have give some parameters to the configure script:
For lua 5.1 ./configure --lua-version=5.1 --with-lua=/usr/local/lua51 --lua-suffix=51 is how I had to do it (--lua-suffix is what I added to lua and luac and --with-lua tells it where the bin, lib, etc. subdirectories are; only relevant if you changed INSTALL_TOP in the makefile)
Optionally you can now proceed to (download, ) build and install lua 5.3 with its standard configuration. After that you can even go back to the luarocks directory and repeat ./configure, make build and make install and it should automatically install itself with lua 5.3 and leave the installation for lua5.1 intact**.
** the luarocks executable is actually just a symlink to luarocks-VERSION (where VERSION can be 5.1, 5.3, etc.) in the same directory. Each time you install luarocks this link is overwritten to point to the latest installation, but the other executables are still there.
OpenResty
The next step is to install OpenResty: open http://openresty.org/en/installation.html and check the prerequisite section. It should say the same as at the beginning of this answer. If not, install any missing package now. You can also just follow the installation instructions there, but I will be repeating it anyway; go to http://openresty.org/en/download.html and download the latest version. Extract the downloaded archives (and rename the new directory to simply openresty). cd to the new directory and run ./configure --with-pcre-jit --with-ipv6 (this might take a while), make (this might take an even longer while) and sudo make install.
At this point everything except lapis itself should be set up and working.
Lapis
To install lapis, type sudo lurocks install lapis (user luarocks-5.1** instead if you have installed more than one version of it).
Congratulations! If you got no errors, you should now have lapis installed and ready to use :)
** see section Luarocks.

Can we execute unix command inside %install section?

I have created an rpm without source using the binary file I had been provided. In a nutshell, I am trying to automate a silent install of sybase client via an rpm. However I need help whether we can put the following silent install command in the %install section of the spec file -
setup.bin –f <responseFileName> -i silent -DAGREE_TO_SYBASE_LICENSE=true -DRUN_SILENT=true
Any help will be much appreciated.
If you want a script to be executed when you install a package, it must be put in the %post section. According to your comment, this is what you did.
The problem is that if you run the install script that way, rpm will not be able to track the installed files. It will not know that those files belong to the package, will not remove them when you uninstall the rpm, will not handle updates properly, etc. You will have a broken rpm.
If you can't build a proper rpm, just use a simple install script that does what you want.

Run time installation directory of debian package contents

I have a debian package that I built that contains a tar ball of the files, a control file, and a postinst file. Its built using dpkg-deb and it installs properly using dpkg.
The modification I would like to make is to have the installation directory of the files be determined at runtime based on an environment variable that will be set when dpkg -i is run on the deb file. I echo out the environment variable in the postinst script and I can see that its set properly.
My questions:
1) Is it possible to dynamically determine the installation directory at runtime?
2) If its possible how would I go about this? I have read about the rules file and the mypackage.install files but I don't know if either of these would allow me to accomplish this.
I could hack it by copying the files to the target location in the posinst script but I would prefer to do it the right way if possible.
Thanks in advance!
So this is what I found out about this problem over the past couple of weeks.
With prepackaged binaries you can't build a debian package with a destination directory dynamicall determined at runtime. I believe that this might be possible if installing a package that is built from source where you can set the install directory using configure. But in this case since these are embedded Ubuntu machines they don't have make so I didn't pursue such an option. I did work out a non traditional method (hack) for installing that did work. Since debian packages simply contain a tar ball relative to / simply build your package relative to a directory under /tmp. In the postinst script you can then determine where to copy the files from the archive into a permanent location.
I expected that after rebooting and the automatic deletion of the subdirectory under /tmp that dpkg might not know that the file package existed. This wasn't a problem. When I ran 'dpkg -l myapp' it showed as still installed. Updating the package using dpkg/apt-get also worked without a hitch.
What I did find is that if you attempted to remove the package using 'dpkg -r myapp' that dpkg would try and remove /tmp which wasn't good. However /tmp isn't easily removed so it never succeeded. Plus in our situation we never remove packages but instead simply upgrade them.
I eventually had to abandon the universal package due to code differences in the sources resulting in having to recompile per platform but I would have left it this way and it did work.
I tried using --instdir to change the install directory of the package and it does relocate the files but dpkg fails since the dpkg file can't be found relative to the new instdir. Using --instdir is sort of like a chroot. I also tried --admindir and --root in various combinations to see if I could use the dpkg system relative to / but install relocate the files but they didn't work. I guess rpm has a relocate option that works but not Ubuntu.
You can also write a script that runs dpkg-deb with a different environment for 6 times, generating 6 different packages. When you make a modification, you simply have to run your script, and all 6 packages gets generated and you can install them on your machines avoiding postinst hacking!
Why not install to a standard location, and simply use a postinst script to create symbolic links to the desired location? This is much cleaner, and shouldn't break anything in dpk -I.

Resources