I have a dockerfile which needs installing some 720mb worth of packages from apt.
run DEBIAN_FRONTEND=noninteractive apt-get install -y python-pip python-dev\
supervisor mercurial subversion buildbot buildbot-slave subversion doxygen\
cmake cloc build-essential valgrind cccc scons g++ cppcheck qt4-dev-tools\
wget lcov graphviz
The build runs up to almost half of the packages requested, then it just hangs idle there.
Is there a way to know for sure if the process has halted or if it's just idle waiting for the network or something along those lines?
You can check which process is running using e.g. ps faux | less. Scroll down to find the lxc-start process corresponding to your container, and see what is running under it (the f flag triggers a forest display which should show in a pretty obvious way which processes belong to the container).
Then, you can use strace -fp <pid> to attach to the last running process in that container and see what it is doing.
Last but not least, you can try to break down the command in 2 or 3 phases. In the (unlikely) case where the problem would come from a package prompting you for input (which shouldn't happen since you specified the noninteractive front-end, but who knows) that will help to single it out.
Most of the time it's a network issue. Do you use a proxy on your host?
Related
Right now, I am tring to build Chromium on my own computer under instructions at https://chromium.googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md#Build-Chromium
At first, it went smoothly. However when I run
$ autoninja -C out/Default chrome
when I run this to start build. It started. And then an error occured and the build process is terminated.
The error is
NameError: name 'unicode' is not defined" and I know it is a common error associated with the difference between python2 and python3.
However, I don't know how to let the ninja use only python2 and avoid this bug.
If you can help me, I will really appreciate it.
I recently ran into this issue when attempting to home build the Brave browser, which is chromium based. It appears that chromium build is based on python2, which is fine, but uses plain calls to "python" in the scripts. Obviously, essentially all modern distros put a symlink to python3 at python in the PATH (generally /usr/bin/python -> /usr/bin/python3). I still retain hope that there is a way to configure the "python path" in the build system, but have not found it and I am not too familiar with ninja.
The first way I "solved" this, and managed a successful build is one I consider a hack and do not recommend as a solution without the stipulation that it leaves your system broken so don't run too many other things. This is to manually temporarily update the symlink. Assuming you have both /usr/bin/python2 and /usr/bin/python3 on your system, remove the symlink at /usr/bin/python and replace it with one to python2:
sudo rm /usr/bin python
sudo ln -s /usr/bin/python2 /usr/bin/python
You can then run the chromium build, and reverse the above change when completed. Note that anything on your system that requires python3 to be at the symlink python cannot be run during this time. I have successfully used this technique to build Brave (and then reverse the change after the build completed).
I can offer you some other options too. One is to set up pyenv. If you search for that, you will find it is a suite that allows you to manage multiple python versions and have different directories use different ones. I researched this, and assume it can work, but have not done it myself.
The next option, which I am currently undertaking right now, is basically a manual watered down version of what pyenv does. I will let you know how it goes. The essence is to add a symlink in the path that will redirect python calls for that instance of the shell (and all subshells it creates). Assuming you are in the source directly at the obvious path:
mkdir .shims
ln -s /usr/bin/python2 .shims/python
export PATH=/home/yourname/src/Chromium/.shims:$PATH
python --version
This should print out whatever version of python2 you have rather than python. Anytime you come back to work here, you have to export the new PATH again. The rest of your system is unaffected, and still finds python3 at python. You can open up a new terminal and type python --version to verify that.
I have Chromium building on Fedora 33. Somewhere in the Chromium build, /usr/bin/python is getting run explicitly. On Fedora, that means Python 3.
If you change /usr/bin/python to point to python2.7, I bet your build will work.
Creating aliases for "python" won't work.
If this works, consider using the alternatives command to easily change /usr/bin/python:
alternatives command for /usr/bin/python
I was trying to upgrade my edb debugger from 0.9 to 1.0. I cloned the repo from github, compiled it and installed it. Unfortunately I forgot to uninstall the old version itself so I ran into some problems. Ithen decided to remove all of edb and start from scratch. I did all sorts of sudo commands (i.e. purge autoremove etc) yet the edb icon is still in my applications menu and works (to a degree cause then I get failed to load necessary plugin). Probably help to mention that I used cmake to compile and install the newer version.
So the question is how do I go about removing all of edb and start over ?
idzireit
This will remove the edb-debugger package and any other dependant packages which are no longer needed.
sudo apt-get remove --auto-remove edb-debugger
If you also want to delete your local/config files for edb-debugger then this will work.
sudo apt-get purge edb-debugger
sudo apt-get purge --auto-remove edb-debugger
To fully install edb-debugger ,follow this link
https://github.com/eteran/edb-debugger/wiki/Installing
Or else try this in your terminal
sudo apt-get install edb-debugger
If this process do not work, please comment below
I have made a very ugly work around o get it working without any errors. When it loads up I changed the symbol directory to point at the symbol directory from the build. In my case this would be the following:
/home/USERNAME/edb-debugger/build/plugins/SymbolViewer/CMakeFiles/SymbolViewer_autogen.dir
Then I did the same with the plugin directroy and made it point to:
/home/USERNAME/edb-debugger/build
I left the third directory (Session Directory) alone. Might play around with that at a later date but it is working even though loaded with ugly hacks.
If anyone has any better answers please advise how to prettify this fix up some.
I tried to reinstall Ovftool into my Centos and replace it with an old version but getting a message which I don't know how to fix it.
command to uninstall it
vmware-installer -u vmware-ovftool
command to install it again
sudo ./VMware-ovftool-4.3.0-7948156-lin.x86_64.bundle
Message received :
Cannot place vmware-ovftool 4.3.0 in the uninstall list.
Any advice?
In this case it's better to use the built-in yum remove <package> this may remove conflicting config.
Using rpm -e <package> is even better, if available, because it guarantees to remove remaining config. It will back up modified config files, but these won't interfere with future installations.
The package name for vmware-ovftool is open-vm-tools on my Ubuntu box, it may be worth checking that too, it could be the same on RHEL/CentOS/Oracle Linux as well.
Simply install another bundle and everything back to normal.
i had followed this tutorial in other to overwrite python2.7 with python 3.4.4 and it worked very nice. Only one thing was wrong. typing python, still goes to python2.7 and python3 goes to python3.4.4. so from what i learnt is that
It is critical that you use make altinstall when you install your custom version of Python. If you use the normal make install you will end up with two different versions of Python in the filesystem both named python. This can lead to problems that are very hard to diagnose.
Please help me revert this.
went through this blog Install Python on Linux (Centos).
I had to re-run make altinstall with sudo command of course. I tried this after that
`sudo ln -s /usr/local/bin/python3.4 /usr/local/bin/python`.
which have me
ln: creating symbolic link `/usr/local/bin/python': File exists
I had to delete the path /usr/local/bin/python.
and then tried again.
problem solved
I am on Mac OS X using codeblocks 10.05
I downloaded Valgrind, and extracted a folder. I am completely lost from there, and have no idea how to build it.
I do not know ANY terminal/console commands and am generally new to programming, so I have no idea how to "build" or "compile" it. I just have a folder called Valgrind with a bunch of random files in it.
Could someone please tell me how to proceed? I already checked the website/documentation but it didn't really give me installation instructions, just usage instructions.
Thanks
PS: I know I already posted this question, but the previous question was shut down, for being too vague. I reposted this one with more info.
PSS: All that I am basically asking is what do I do to install Valgrind right after I download it from the website and extract the files?
Recommended:
Use brew: brew install valgrind
Manual Install:
Here's what worked on my Mac (10.6). Double-check you have the latest version, then change into the uncompressed directory
cd /users/(insert username here)/downloads/valgrind-3.17.0
I suggest you do as another posted and read the readme.
nano README
Commence the build; /usr/local is the place on the filesystem that the program will be installed to. There are many arguments like prefix that are available to customize the installation to your particular system if it doesn't work by default. Normally just using ./configure works perfectly well though.
./configure --prefix=/usr/local
make
sudo make install
Or you could probably get it from fink or macports or homebrew.
You can install it through brew for Mac:
brew install valgrind
You might have to manually link the entry to /usr/local/bin as brew refused to do it in my case:
$ ln /usr/local/Cellar/valgrind/3.8.1/bin/vgdb /usr/local/bin/vgdb
ln: /usr/local/bin/vgdb: Permission denied
$ sudo ln /usr/local/Cellar/valgrind/3.8.1/bin/vgdb /usr/local/bin/vgdb
On MacOS High Sierra
If you have the following error message:
brew install valgrind
valgrind: This formula either does not compile or function as expected on macOS
versions newer than Sierra due to an upstream incompatibility.
Fix
(1) To correctly install it, first, type the following command at the Terminal (which opens Valgrind’s formulae)
brew edit valgrind
And change the URL in head section
https://sourceware.org/git/valgrind.git
to
git://sourceware.org/git/valgrind.git
(2) Do an update for Homebrew:
brew update
(3) Finally, use the following command to install Valgrind from the HEAD:
brew install --HEAD valgrind
Sources
https://www.gungorbudak.com/blog/2018/04/28/how-to-install-valgrind-on-macos-high-sierra/
https://github.com/Homebrew/homebrew-core/issues/18998
For macOS Big Sur / Monterey:
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind
The core process is pretty simple:
Make sure you are in the correct directory.
First run:
./configure
when that is finished, run:
make
at this point you will need to su into root (this is relatively tricky to do, see the note at the end). As root, run:
make install
When this is finished you will have a working valgrind installation. Test it by running
valgrind ls -l
To su into root, you will need to have set up a root account. If you have not done this in the past, see the instructions from apple here.
To perform the actual su, you will first have to be running an account with administrator privileges. If you are not already doing so, you can switch users with the following:
su admin
where admin is the name of an user with administrator privileges (you will need to enter the password for this account). From there, you can then run su to go into root:
su
You will need to enter the root password that you set up earlier.
You may find it easier to use something like macports. How to install that is probably beyond the scope of this question, but they have a page dedicated to it on their site.
Once you have macports installed, you need to type:
sudo port install valgrind +universal
As you say you don't have any experience of command lines, let's just briefly go through the different parts of this command:
sudo means the rest of the command will run as root, and will ask for your password. This is needed for the installer to have the correct permissions
port is the command line tool for managing macports
install is a command for port. Try port help to see a list of commands.
valgrind tells macports what it should be installing
+universal is a variant. This tells macports to configure valgrind to support 32 bit and 64 bit support.